Cannot scp between two remote hosts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
According to the manual page, scp should be able to copy between two remote hosts:
scp user@host1:file1 user@host2:.
However, it fails after asking for the password for the first host, even though the same file can be copied in two steps:
$ scp xx.yy.zz.aa:*.csv xx.yy.zz.bb:.
<email address hidden>'s password:
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,
lost connection
$ scp xx.yy.zz.aa:*.csv .
<email address hidden>'s password:
configuration_
$ scp *.csv xx.yy.zz.bb:.
<email address hidden>'s password:
configuration_
$ scp -v xx.yy.zz.aa:*.csv xx.yy.zz.bb:.
Executing: /usr/bin/ssh '-x' '-oClearAllForw
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /home/foo/
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to xx.yy.zz.aa [xx.yy.zz.aa] port 22.
debug1: Connection established.
debug1: identity file /home/foo/
debug1: identity file /home/foo/
debug1: identity file /home/foo/
debug1: identity file /home/foo/
debug1: identity file /home/foo/
debug1: identity file /home/foo/
debug1: identity file /home/foo/
debug1: identity file /home/foo/
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.8
debug1: match: OpenSSH_6.8 pat OpenSSH* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr <email address hidden> none
debug1: kex: client->server aes128-ctr <email address hidden> none
debug1: sending SSH2_MSG_
debug1: expecting SSH2_MSG_
debug1: Server host key: ECDSA 29:ad:e4:
debug1: Host 'xx.yy.zz.aa' is known and matches the ECDSA host key.
debug1: Found key in /home/foo/
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_
debug1: SSH2_MSG_
debug1: Authentications that can continue: publickey,
debug1: Next authentication method: publickey
debug1: Trying private key: /home/foo/
debug1: Trying private key: /home/foo/
debug1: Trying private key: /home/foo/
debug1: Trying private key: /home/foo/
debug1: Next authentication method: keyboard-
debug1: Authentications that can continue: publickey,
debug1: Next authentication method: password
<email address hidden>'s password:
debug1: Authentication succeeded (password).
Authenticated to xx.yy.zz.aa ([xx.yy.zz.aa]:22).
debug1: channel 0: new [client-session]
debug1: Requesting <email address hidden>
debug1: Entering interactive session.
debug1: client_
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending command: scp -v *.csv xx.yy.zz.bb:.
Executing: program /usr/bin/ssh host xx.yy.zz.bb, user (unspecified), command scp -v -t .
OpenSSH_6.8, LibreSSL 2.1
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to xx.yy.zz.bb [xx.yy.zz.bb] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/foo/
debug1: key_load_public: No such file or directory
debug1: identity file /home/foo/
debug1: key_load_public: No such file or directory
debug1: identity file /home/foo/
debug1: key_load_public: No such file or directory
debug1: identity file /home/foo/
debug1: key_load_public: No such file or directory
debug1: identity file /home/foo/
debug1: key_load_public: No such file or directory
debug1: identity file /home/foo/
debug1: key_load_public: No such file or directory
debug1: identity file /home/foo/
debug1: key_load_public: No such file or directory
debug1: identity file /home/foo/
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.8
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.8
debug1: match: OpenSSH_6.8 pat OpenSSH* compat 0x04000000
debug1: Authenticating to xx.yy.zz.bb:22 as 'foo'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client <email address hidden> <implicit> none
debug1: kex: client->server <email address hidden> <implicit> none
debug1: expecting SSH2_MSG_
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:
debug1: Host 'xx.yy.zz.bb' is known and matches the ECDSA host key.
debug1: Found key in /home/foo/
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_
debug1: SSH2_MSG_
debug1: Authentications that can continue: publickey,
debug1: Next authentication method: publickey
debug1: Trying private key: /home/foo/
debug1: Trying private key: /home/foo/
debug1: Trying private key: /home/foo/
debug1: Trying private key: /home/foo/
debug1: Next authentication method: keyboard-
debug1: Authentications that can continue: publickey,
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: Authentications that can continue: publickey,
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: Authentications that can continue: publickey,
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: Authentications that can continue: publickey,
debug1: No more authentication methods to try.
Permission denied (publickey,
lost connection
debug1: client_
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2620, received 7112 bytes, in 0.5 seconds
Bytes per second: sent 4874.4, received 13231.6
debug1: Exit status 1
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: openssh-client 1:6.6p1-2ubuntu2
ProcVersionSign
Uname: Linux 3.16.0-38-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.11
Architecture: amd64
CurrentDesktop: Unity
Date: Sun Jun 7 17:30:19 2015
InstallationDate: Installed on 2015-03-27 (71 days ago)
InstallationMedia: Ubuntu-Server 14.04.2 LTS "Trusty Tahr" - Release amd64 (20150218.1)
RelatedPackageV
ssh-askpass N/A
libpam-ssh N/A
keychain N/A
ssh-askpass-gnome 1:6.6p1-2ubuntu2
SSHClientVersion: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2, OpenSSL 1.0.1f 6 Jan 2014
SourcePackage: openssh
UpgradeStatus: No upgrade log present (probably fresh install)
This bug was fixed in the package openssh - 1:8.7p1-2
---------------
openssh (1:8.7p1-2) unstable; urgency=medium
* Backport from upstream:
- Avoid NULL deref in -Y find-principals (closes: #999593).
-- Colin Watson <email address hidden> Sat, 13 Nov 2021 13:40:50 +0000