On Wed, 2009-10-14 at 12:53 -0600, Nathan Farrar wrote: > I'm using paramiko to manage cisco devices remotely. It works > beautifully when I have a script open a connection to a device, > execute a command, then close the connection. However, if I connect > and then attempt to execute a command, and then a second command, an > error is thrown. > > If I comment out the second client.exec_command() line, there are no > problems. Any tips to get this to work correctly? >
It's not a Paramiko issue... I discovered the same thing a while back, when talking to Cisco devices. It appears that their SSH implementation closes the whole connection after the first command, instead of just closing that one channel. Unless you approach it quite differently (use a pty), your only real option is to reconnect for each command you want to execute. _______________________________________________ paramiko mailing list [email protected] http://www.lag.net/cgi-bin/mailman/listinfo/paramiko
