Paramiko hanging during authentication, when runned by dint of unittest runner
Good day. I have a strange problem with paramiko ssh client. Connect paramiko method hangs when it's called outside unittest2 classes/functions and code was run by unittest runner. There is a piece of code, where problem appears: import paramiko import unittest2 ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect('172.18.67.10', username='root', password='secrete') _, stdout, _ = ssh.exec_command('date') class TestTest(unittest2.TestCase): def setUp(self): pass If I move ssh.connect into TestTest class or setUpModule function, connection will be