python paramiko Issue while closing the connection
I have just been trying ssh connection with paramiko . Everything looks fine, but in the final step, when calling the close() method to disconnect the client. Here is my script: #!/usr/bin/python import paramiko import os ssh = paramiko.SSHClient() private_key = os.path.expanduser('~/.ssh/id_dsa') mkey = paramiko.DSSKey.from_private_key_file(private_key,password='JacquiKoala') ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect('monitor', username='probert', pkey = mkey) stdin, stdout, stderr = ssh.exec_command('whoami') print stdout.readlines() ssh.close The shell just hangs