[Bug 369] Inconsistant exiit status from scp
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Tue Sep 10 19:19:07 EST 2002
http://bugzilla.mindrot.org/show_bug.cgi?id=369
------- Additional Comments From devel at pitux.com 2002-09-10 19:19 -------
I confirm that this bug does exist. It's especially annoying since we use here
a lot of scripts which check for the return values of scp to indicate success
or failure.
In fact it does the good thing on nonexistent files/dirs/etc, but fails in case
of auth failure, name resolution failures and so on (the number after "rtfm" in
the prompt reports the cmd exit status):
fg!rtfm 0 (pts/2) ~ $ scp -v root at mod-tsf.pitux.com:.bashrc /tmp
Executing: program /usr/bin/ssh host mod-tsf.pitux.com, user root, command scp
-v -f .bashrc
OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
ssh: mod-tsf.pitux.com: Name or service not known
fg!rtfm 0 (pts/2) ~ $ scp -v root at mod-tsd.pitux.com:fartr /tmp
Executing: program /usr/bin/ssh host mod-tsd.pitux.com, user root, command scp
-v -f fartr
OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to mod-tsd.pitux.com [212.67.34.43] port 22.
debug1: Connection established.
debug1: identity file /home/fg/.ssh/identity type 0
debug1: identity file /home/fg/.ssh/id_rsa type -1
debug1: identity file /home/fg/.ssh/id_dsa type -1
debug1: Remote protocol version 1.5, remote software version OpenSSH_3.2.2p1
debug1: match: OpenSSH_3.2.2p1 pat OpenSSH*
debug1: Local version string SSH-1.5-OpenSSH_3.4p1
debug1: Waiting for server public key.
debug1: Received server public key (768 bits) and host key (1024 bits).
debug1: Host 'mod-tsd.pitux.com' is known and matches the RSA1 host key.
debug1: Found key in /home/fg/.ssh/known_hosts:17
debug1: Encryption type: 3des
debug1: Sent encrypted session key.
debug1: cipher_init: set keylen (16 -> 32)
debug1: cipher_init: set keylen (16 -> 32)
debug1: Installing crc compensation attack detector.
debug1: Received encrypted confirmation.
debug1: Trying RSA authentication via agent with 'fgaliegue at ovh.tbs-internet.com'
debug1: Received RSA challenge from server.
debug1: Sending response to RSA challenge.
debug1: Remote: RSA authentication accepted.
debug1: RSA authentication accepted by server.
debug1: Sending command: scp -v -f fartr
debug1: Entering interactive session.
debug1: fd 0 setting O_NONBLOCK
debug1: fd 1 setting O_NONBLOCK
scp: fartr: No such file or directory
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 1, stdout 39, stderr 0 bytes in 0.3 seconds
debug1: Bytes per second: stdin 3.5, stdout 136.5, stderr 0.0
debug1: Exit status 1
fg!rtfm 1 (pts/2) ~ $ scp -v fg at mod-tsd.pitux.com:fartr /tmp
Executing: program /usr/bin/ssh host mod-tsd.pitux.com, user fg, command scp -v
-f fartr
OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to mod-tsd.pitux.com [212.67.34.43] port 22.
debug1: Connection established.
debug1: identity file /home/fg/.ssh/identity type 0
debug1: identity file /home/fg/.ssh/id_rsa type -1
debug1: identity file /home/fg/.ssh/id_dsa type -1
debug1: Remote protocol version 1.5, remote software version OpenSSH_3.2.2p1
debug1: match: OpenSSH_3.2.2p1 pat OpenSSH*
debug1: Local version string SSH-1.5-OpenSSH_3.4p1
debug1: Waiting for server public key.
debug1: Received server public key (768 bits) and host key (1024 bits).
debug1: Host 'mod-tsd.pitux.com' is known and matches the RSA1 host key.
debug1: Found key in /home/fg/.ssh/known_hosts:17
debug1: Encryption type: 3des
debug1: Sent encrypted session key.
debug1: cipher_init: set keylen (16 -> 32)
debug1: cipher_init: set keylen (16 -> 32)
debug1: Installing crc compensation attack detector.
debug1: Received encrypted confirmation.
debug1: Trying RSA authentication via agent with 'fgaliegue at ovh.tbs-internet.com'
debug1: Server refused our key.
debug1: RSA authentication using agent refused.
debug1: Trying RSA authentication with key '/home/fg/.ssh/identity'
debug1: Server refused our key.
debug1: Doing challenge response authentication.
debug1: No challenge.
Permission denied.
debug1: Calling cleanup 0x8067140(0x0)
fg!rtfm 0 (pts/2) ~ $
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the openssh-unix-dev
mailing list