What does .+i+;I: mean with scp?

I'm trying to transfer a file from my laptop (OSX 10.6) to my school's linux server (RedHat 5). Ssh works normally with a public key but when I try to transfer a file with scp file.txt school:~ the text .+i+;I: spits out and scp exits with code 1.

A google search shows code 1 to be a general error which isn't really helpful.

link|improve this question
feedback

migrated from serverfault.com Sep 9 '09 at 7:25

This question came from our site for system administrators and desktop support professionals.

2 Answers

up vote 4 down vote accepted

I'm pretty sure that's not an error code.

Is your remote shell "clean"? In other words, does it spit out motd-style text even for non-interactive sessions?

Easy way to test (stolen from the rsync man page):

$ ssh remotehost /bin/true | wc
       0       0       0

If you get anything back other than a row of zeros, your shell is not clean and will not work with scp until it is made so. As it is spewing text for non-interactive sessions, it may require admin-level intervention to fix.

EDIT: I've verified that scp behaves exactly as I've described. If the shell returns data in non-interactive sessions, that data is returned on the client side and scp exits with a return code of '1'. The string you describe looks to me like terminal formatting codes.

link|improve this answer
/bin/true dumps my motd file into the ouput for some reason. Running /bin/true on an interact session returns 0 0 0. – epochwolf Nov 10 '09 at 19:16
Figured out the issue. I had a print statement in .bashrc... which should have been in .bash_profile. – epochwolf Nov 20 '09 at 16:51
feedback

If you're using a public key for ssh, you'll need to specify it for scp as well:

scp -i [path to your public key file] file.txt school:~
link|improve this answer
I have connection information stored in ~/.ssh/config which scp loads just fine. I'm able to do "scp vps:/home/user/file.ext ~" to dump a file from my VPS to my home folder. – epochwolf Nov 10 '09 at 19:18
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.