Version 1.15.0 introduced a regression with ssh agent forwarding which causes commands to hang when they use the forwarded agent. This bug wasn't present in version 1.14.1
We were experiencing this problem with fabric, which can be reproduced with the following script executed with fab -H $HOST test
fab -H $HOST test
from fabric.api import run, env
env.forward_agent = True
Fabric is using paramiko.agent.AgentRequestHandler(channel) to enable ssh agent forwarding, and I managed to reproduce the regression using paramiko directly:
host = sys.argv
client = paramiko.SSHClient()
channel = client.get_transport().open_session()
forward = paramiko.agent.AgentRequestHandler(channel)
stdout = channel.makefile('r')
stderr = channel.makefile_stderr('r')
for line in stdout:
for line in stderr:
@bitprophet I found commit 752507a was the first failing commit using git bisect.
The regression came when resolving merge conflicts in that merge commit. The problem is that Transport.init changed the position of the gss_kex and gss_deleg_creds arguments, and SSHClient.connect constructs a Transport with positional arguments for gss_kex and gss_deleg_creds.
I'll write a pull request that creates the Transport with keyword arguments.
Use keyword arguments for arguments when creating a Transport.
@dylanahsmith Thanks for the awesomely detailed bug report - I'll get right on this!
Rolling into the PR.
Changelog re #399