Bug 2383 - ssh-copy-id hangs when already connected with connection sharing
Summary: ssh-copy-id hangs when already connected with connection sharing
Status: CLOSED DUPLICATE of bug 2195
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh-copy-id (show other bugs)
Version: 6.8p1
Hardware: All All
: P5 minor
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-16 00:58 AEST by Paul Tobias
Modified: 2015-08-11 23:04 AEST (History)
0 users

See Also:


Attachments
ssh-copy-id-connection-sharing-hang.patch (559 bytes, patch)
2015-04-16 00:58 AEST, Paul Tobias
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Tobias 2015-04-16 00:58:23 AEST
Created attachment 2587 [details]
ssh-copy-id-connection-sharing-hang.patch

If I successfully ssh into somewhere and then try to use ssh-copy-id, it just hangs.

I have this in my .ssh/config:
ControlMaster  auto
ControlPath    /dev/shm/ssh_control_%h_%p_%r
ControlPersist 3600

It's because of this line in ssh-copy-id:
REMOTE_VERSION=$(ssh -v -o PreferredAuthentications=',' "$@" 2>&1 |
                 sed -ne 's/.*remote software version //p')

Because of the connection sharing, this doesn't fail, but opens a shell on the other side and waits for input indefinitely.

A simple fix is to add -o ControlPath=none.
Comment 1 Paul Tobias 2015-04-16 02:18:39 AEST
Oh, this was already reported as bug 2195. I went through the process at http://www.openssh.com/report.html, but I didn't see that bug.

*** This bug has been marked as a duplicate of bug 2195 ***
Comment 2 Damien Miller 2015-08-11 23:04:03 AEST
Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1