robey/paramiko — Issue #55: Fail to re-use SSH session when connecting to Cisco C2960 switcher
Author: yegle
Created: 2011-11-16 11:35:14+00:00
State: open

Here's my code:

```python
#!/usr/bin/python26

import paramiko

ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

ssh.connect('1.2.3.4',username='xxx', password='xxxx',allow_agent=False)
stdin, stdout, stderr = ssh.exec_command('show version')
stdin, stdout, stderr = ssh.exec_command('show mac brief')
```

result in:

```python
Traceback (most recent call last):
File "./test.py", line 10, in
stdin, stdout, stderr = ssh.exec_command('show mac brief')
File "/usr/lib/python2.6/site-packages/paramiko/client.py", line 363, in exec_command
chan = self._transport.open_session()
File "/usr/lib/python2.6/site-packages/paramiko/transport.py", line 658, in open_session
return self.open_channel('session')
File "/usr/lib/python2.6/site-packages/paramiko/transport.py", line 746, in open_channel
raise e
EOFError
```