Is this normal?

Darren Tucker dtucker at
Tue Sep 26 09:49:38 EST 2006

Tim Cagle wrote:
> [tim at javadev1 tim]$ scp opteron:/tmp/tim2 boomshakalaka:/tmp
> ssh: boomshakalaka: Name or service not known
> lost connection
> [tim at javadev1 tim]$ echo $?
> 0
> And if so why given that the man page says:
>       scp exits with 0 on success or >0 if an error occurred."
> I've tried to search the archives to no avail BTW.
> Sorry if I am asking the wrong question in the wrong
> forum but I did not know what else to do.

Which version of OpenSSH is that?  There were some changes in 4.3x that 
fixed up the exit codes for ssh(1) for certain error conditions.

The soon-to-be-current version also seems ok:

$ ssh -V
OpenSSH_4.4p1, OpenSSL 0.9.7f 22 Mar 2005
$ scp /tmp/foo nosuch:/tmnp/foo2; echo $?
ssh: nosuch: Name or service not known
lost connection

Darren Tucker (dtucker at
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
     Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

More information about the openssh-unix-dev mailing list