Bug 2118

Summary: ssh-copy-id hangs
Product: Portable OpenSSH Reporter: karoshism
Component: MiscellaneousAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED INVALID    
Severity: enhancement CC: dtucker
Priority: P5    
Version: 6.2p1   
Hardware: Other   
OS: Linux   

Description karoshism 2013-06-05 21:06:59 AEST
When running ssh-copy-id, it executes

REMOTE_VERSION=$(ssh -v -o PreferredAuthentications=',' "$@" 2>&1 |
                 sed -ne 's/.*remote software version //p')

Now this hangs for me, as it produces an endless loop like

# ssh -v -o PreferredAuthentications=',' root@machine
OpenSSH_6.2p1, OpenSSL 1.0.1e 11 Feb 2013
...
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
Permission denied (publickey,password).
OpenSSH_6.2p1, OpenSSL 1.0.1e 11 Feb 2013
...
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
Permission denied (publickey,password).
OpenSSH_6.2p1, OpenSSL 1.0.1e 11 Feb 2013
...
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
Permission denied (publickey,password).
...

etcetera until I interrupt it with CTRL-C.
Comment 1 Darren Tucker 2013-06-06 00:39:36 AEST
what ssh implementation is "machine" running?  ie what does 

ssh -v -o PreferredAuthentications=',' machine 2>&1 | grep "remote software version"

give?
Comment 2 karoshism 2013-06-06 02:37:38 AEST
(In reply to Darren Tucker from comment #1)
> what ssh implementation is "machine" running?  ie what does 
> 
> ssh -v -o PreferredAuthentications=',' machine 2>&1 | grep "remote
> software version"
> 
> give?

Ok, this was a PEBKAC. Sorry for the noise. "ssh" on this system is really an alias to a wrapper script that was not prepared to manage that.
Comment 3 Damien Miller 2016-08-02 10:41:34 AEST
Close all resolved bugs after 7.3p1 release