Connecting to an Enterasys B2 Switch (using demo_simple.py) for an
interactive shell doesn't work:
Connected. Getting Shell...
DEBUG:paramiko.transport:[chan 1] Max packet in: 34816 bytes
DEBUG:paramiko.transport:[chan 1] Max packet out: 16384
INFO:paramiko.transport:Secsh channel 1 opened.
ERROR:paramiko.transport:Channel request for unknown
*** Caught exception: <class 'paramiko.SSHException'>: Channel closed.
The channels gets opened with index 1 on client
(paramiko) side and index 0 on server (switch)
Probably the switch doesn't support this and
replies to the pty request with a wrong channel
id. Because of that paramiko closes the
This can be solved (or worked around) easily by
initialising _channel_counter with 0.
This is what other clients, like openssh do.
I don't see a problem with initialising this
counter with 0.