{"action":"opened","issue":{"url":"https://api.github.com/repos/zeromq/pyzmq/issues/676","labels_url":"https://api.github.com/repos/zeromq/pyzmq/issues/676/labels{/name}","comments_url":"https://api.github.com/repos/zeromq/pyzmq/issues/676/comments","events_url":"https://api.github.com/repos/zeromq/pyzmq/issues/676/events","html_url":"https://github.com/zeromq/pyzmq/issues/676","id":84438485,"number":676,"title":"try_passwordless_ssh hangs if ssh key is present, but ssh-agent not running","user":{"login":"michaelwimmer","id":4158195,"avatar_url":"https://avatars.githubusercontent.com/u/4158195?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelwimmer","html_url":"https://github.com/michaelwimmer","followers_url":"https://api.github.com/users/michaelwimmer/followers","following_url":"https://api.github.com/users/michaelwimmer/following{/other_user}","gists_url":"https://api.github.com/users/michaelwimmer/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelwimmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelwimmer/subscriptions","organizations_url":"https://api.github.com/users/michaelwimmer/orgs","repos_url":"https://api.github.com/users/michaelwimmer/repos","events_url":"https://api.github.com/users/michaelwimmer/events{/privacy}","received_events_url":"https://api.github.com/users/michaelwimmer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-03T08:43:04Z","updated_at":"2015-06-03T08:43:04Z","closed_at":null,"body":"When an ssh key is present, but no ssh-agent is running (or the key hasn't been added yet), then ssh will ask for the passphrase of the key. The message is in a form like:\r\n\r\n    Enter passphrase for key '/home/user/.ssh/id_rsa'\r\n\r\ntry_passwordless_ssh() will hang in this situation, as this is an unexpected response, and ssh will wait for input indefinitely.\r\n\r\nI believe a solution would be to add 'passphrase' to array in the line\r\n\r\n    i = p.expect([ssh_newkey, '[Pp]assword:'], timeout=.1)\r\n\r\nin tunnel.py. Also, I guess this has to be done in openssh_tunnel()"}}