Noticed git clone ssh://[...] was consistently hanging on my development VM and outbound SSH connections did too. Enabling SSH debugging, the process hung on "sign_and_send_pubkey" until interrupted via CTRL+C:
$ ssh -vvv remotehost.localdomain
OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
[...]
debug1: Offering RSA public key: /home/cleverguy/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 535
debug2: input_userauth_pk_ok: fp 66:...:88
debug3: sign_and_send_pubkey: RSA 66:...:88
^C
$
Googling "ssh hangs debug3: sign_and_send_pubkey:" identified Red Hat Bugzilla – Bug 890522. Which, while closed as a duplicate for Red Hat Bugzilla – Bug 907156, was much more useful for resolving the immediate issue. Specifically Comment #11, from 2014, suggested command:
$ sudo kill -9 $(pidof gnome-keyring-daemon)
This immediately resolved the SSH authentication hang and git clone issues. The subsequent comments from 2015 and 2016 indicate that this issue is A) stubbornly long lived and B) cross platform. There are apparently more elegant and persistent solutions using environment variable SSH_AUTH_SOCK that I will leave to the reader to investigate.
PS Please do not lecture me on Gnome automatic login and security.
Comments