try:
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(device, username='username', password='password', look_for_keys=False, allow_agent=False, timeout=None, auth_timeout=60.0 )
remote_conn = ssh.invoke_shell()
output = remote_conn.recv(65535)
print("connection established to %s" % device)
except IOError as error:
print("connecting to device %s failed." % device)
print error
except paramiko.AuthenticationException as error:
print("connecting to device %s failed." % device)
print error
except Exception as error:
print("connecting to device %s failed." % device)
print error
connect()得到了一个意外的关键字参数'auth_timeout'