> Shall I simply call ssh.close() first and login again to make the retry > works? Or maybe there is a way to cancel the exe_command? > > I spend some time looking into paramiko. Here are thoughts in my mind, correct me if I'm wrong. :-)
Basically, we initialize a SSHClient, call connect() to establish the connection(a new Transport), exe_command will call the open_session() to add a new channel for this transport which will be stored in Transport._channels. If I wanna cancel the exe_command, the best way may be simply call *ssh._transport._channels[ssh._transport.channel_count].close()*to close the previous channel and call the exe_command() again. Any comments? -- >: ~
_______________________________________________ paramiko mailing list paramiko@lag.net http://www.lag.net/cgi-bin/mailman/listinfo/paramiko