vote up 0 vote down star

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.

flag

migrated from serverfault.com

2 Answers

vote up 4 vote down check

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|flag
/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 at 19:16
Figured out the issue. I had a print statement in .bashrc... which should have been in .bash_profile. – epochwolf Nov 20 at 16:51
vote up -1 vote down

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|flag
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 at 19:18

Your Answer

Get an OpenID
or
never shown

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