scp user at host1 user at host2 broken?

Pekka Savola pekkas at netcore.fi
Sun Feb 25 04:14:24 EST 2001


Hello all,

Is it just me or is 'scp user at host1 user at host2' broken (if the server asks
you for the password)?

1) [password required]

>From OpenSSH 2.5.1p1 -> OpenSSH 2.5.1p1 -> OpenSSH 2.3.0, I get like:

> scp pekkas at xxx:~/*.patch psavola at yyy:~/temp/
 psavola at xxx's password:
 You have no controlling tty.  Cannot read passphrase.
 lost connection

2) [protocol1 (different host), no password required]

$ scp pekkas at xxx:~/*.patch pjsavol3 at zzz:~/temp/
pekkas at xxx's password:
/home/unf/openssh-SNAP-20010219-redhat-init-functions.patch: No such file
or directoryselect: Bad file descriptor

NOTE: ~unf (the username in the originating host) is used instead of
forced pekkas at netcore.fi!

NOTE: a bad file descriptor warning.  I believe this will happen if you
use full path names instead of '~' etc.

Also, -P -flag is ignored in host-to-host copy.  Looking at the source,
this appears to be intentional (ie: which definition should that apply
to?)

Longer log of case 2):

[unf at install5 unf]$ scp -v -v -v pekkas at xxx:~/*.patch pjsavol3 at zzz:~/temp/
Executing: /usr/bin/ssh -v -x -o'FallBackToRsh no' -n -l pekkas xxx scp -v
~/*.patch 'pjsavol3 at zzz:~/temp/'
OpenSSH_2.5.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090581f
debug: Reading configuration data /etc/ssh/ssh_config
debug: ssh_connect: getuid 501 geteuid 0 anon 0
debug: Connecting to xxx [193.94.160.1] port 22.
debug: Allocated local port 1021.
debug: Connection established.
debug: identity file /home/unf/.ssh/identity type 3
debug: identity file /home/unf/.ssh/id_dsa type 3
debug: Remote protocol version 1.99, remote software version
OpenSSH_2.5.1p1
debug: match: OpenSSH_2.5.1p1 pat ^OpenSSH
Enabling compatibility mode for protocol 2.0
debug: Local version string SSH-2.0-OpenSSH_2.5.1p1
debug: Seeding random number generator
debug: send KEXINIT
debug: done
debug: wait KEXINIT
debug: got kexinit:
diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug: got kexinit: ssh-dss,ssh-rsa
debug: got kexinit:
3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc at lysator.liu.se
debug: got kexinit:
3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc at lysator.liu.se
debug: got kexinit:
hmac-sha1,hmac-md5,hmac-ripemd160,hmac-ripemd160 at openssh.com,hmac-sha1-96,hmac-md5-96
debug: got kexinit:
hmac-sha1,hmac-md5,hmac-ripemd160,hmac-ripemd160 at openssh.com,hmac-sha1-96,hmac-md5-96
debug: got kexinit: none,zlib
debug: got kexinit: none,zlib
debug: got kexinit:
debug: got kexinit:
debug: first kex follow: 0
debug: reserved: 0
debug: done
debug: kex: server->client arcfour hmac-sha1 none
debug: kex: client->server arcfour hmac-sha1 none
debug: Sending SSH2_MSG_KEX_DH_GEX_REQUEST.
debug: Wait SSH2_MSG_KEX_DH_GEX_GROUP.
debug: Got SSH2_MSG_KEX_DH_GEX_GROUP.
debug: bits set: 1029/2049
debug: Sending SSH2_MSG_KEX_DH_GEX_INIT.
debug: Wait SSH2_MSG_KEX_DH_GEX_REPLY.
debug: Got SSH2_MSG_KEXDH_REPLY.
debug: Host 'xxx' is known and matches the RSA host key.
debug: Found key in /home/unf/.ssh/known_hosts2:1
debug: bits set: 1011/2049
debug: ssh_rsa_verify: signature correct
debug: Wait SSH2_MSG_NEWKEYS.
debug: GOT SSH2_MSG_NEWKEYS.
debug: send SSH2_MSG_NEWKEYS.
debug: done: send SSH2_MSG_NEWKEYS.
debug: done: KEX2.
debug: send SSH2_MSG_SERVICE_REQUEST
debug: service_accept: ssh-userauth
debug: got SSH2_MSG_SERVICE_ACCEPT
debug: authentications that can continue:
publickey,password,keyboard-interactive
debug: next auth method to try is publickey
debug: key does not exist: /home/unf/.ssh/identity
debug: key does not exist: /home/unf/.ssh/id_dsa
debug: next auth method to try is password
pekkas at xxx's password:
debug: ssh-userauth2 successful: method password
debug: fd 4 setting O_NONBLOCK
debug: channel 0: new [client-session]
debug: send channel open 0
debug: Entering interactive session.
debug: client_init id 0 arg 0
debug: Sending command: scp -v
/home/unf/openssh-SNAP-20010219-redhat-init-functions.patch
pjsavol3 at zzz:~/temp/
debug: channel 0: open confirm rwindow 0 rmax 16384
debug: channel 0: read<=0 rfd 4 len 0
debug: channel 0: read failed
debug: channel 0: input open -> drain
debug: channel 0: close_read
debug: channel 0: input: no drain shortcut
debug: channel 0: ibuf empty
debug: channel 0: input drain -> closed
debug: channel 0: send eof
Executing: program /usr/bin/ssh host zzz, user pjsavol3, command scp -v -t
~/temp/
/home/unf/openssh-SNAP-20010219-redhat-init-functions.patch: No such file
or directorydebug: client_input_channel_req: channel 0 rtype exit-status
reply 0
debug: channel 0: rcvd eof
debug: channel 0: output open -> drain
debug: channel 0: rcvd close
debug: channel 0: obuf empty
debug: channel 0: output drain -> closed
debug: channel 0: close_write
debug: channel 0: send close
debug: channel 0: full closed2
debug: channel_free: channel 0: status: The following connections are
open:
  #0 client-session (t4 r0 i8/0 o128/0 fd -1/-1)

select: Bad file descriptor
debug: Transferred: stdin 0, stdout 0, stderr 29 bytes in 10.7 seconds
debug: Bytes per second: stdin 0.0, stdout 0.0, stderr 2.7
debug: Exit status 1

-- 
Pekka Savola                  "Tell me of difficulties surmounted,
Netcore Oy                    not those you stumble over and fall"
Systems. Networks. Security.   -- Robert Jordan: A Crown of Swords







More information about the openssh-unix-dev mailing list