You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Client direct-tcpip request to Paramiko server results in message authentication code incorrect #630
def handle(self):
print "Handling new request on socket %s" % self.request
t = paramiko.Transport(self.request, gss_kex=False)
t.add_server_key(host_key)
server = SSHServer()
try:
t.start_server(server=server)
except Exception as e:
print e
channel = t.accept(1)
if channel:
print "got: %s" % channel.get_id()
for p in keep_tuns.get(str(t), []):
if not p.pid:
p.start()
next_channel = t.accept()
print "Got another channel! %s" % next_channel
next_channel.send("Hey!")
for p in keep_tuns.get(str(t), []):
p.join()
The custom shell works fine, and after I added the check_channel_direct_tcpip_request implementation my Server will create a new channel once a client requests a new 'direct-tcpip' request via a local-forward.
However, the client immediately disconnects because (I am assuming) of an unexpected response from the server to it's 'direct-tcpip' request.
Could be a bug, MAC related stuff got an update in 1.16 (if that's what you're on?), though it was mostly just adding ciphers/algorithms and not changing the behavior involved. Those changes may have impacted the SSHServer side, which gets less testing love than the more widely-used Client.
I will try to recreate when I have time but in the meantime, please try the usual troubleshooting stuff like swapping out Paramiko versions to determine if the issue begins at a given version number, that will help narrow it down. Thanks!
Activity
bitprophet commentedon Dec 6, 2015
Could be a bug, MAC related stuff got an update in 1.16 (if that's what you're on?), though it was mostly just adding ciphers/algorithms and not changing the behavior involved. Those changes may have impacted the SSHServer side, which gets less testing love than the more widely-used Client.
I will try to recreate when I have time but in the meantime, please try the usual troubleshooting stuff like swapping out Paramiko versions to determine if the issue begins at a given version number, that will help narrow it down. Thanks!
EDIT: also, for the "maybe not a bug but an incomplete implementation" option, maybe compare your code to the test server used by Fabric (https://github.com/fabric/fabric/blob/master/tests/server.py) - it works well enough to test Fabric's use of SSHClient.
bitprophet commentedon Dec 6, 2015
Also assigning to 1.16.1 in case this is a regression caused in 1.16.0.
sngardner commentedon Dec 6, 2015
Cool, I'll check out Fabric's implementation and if I haven't missed anything, earlier versions of Paramiko.
sngardner commentedon Dec 7, 2015
I am using 1.15.0 - has the same behavior as 1.16.0. I apparently need to update my implementation to work with earlier versions, however.