Advertisement
Guest User

Untitled

a guest
Jul 12th, 2016
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. username = raw_input("Username:")
  2. password = getpass.getpass("Password: ")
  3.  
  4. remote_conn_pre = paramiko.SSHClient()
  5. remote_conn_pre.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  6.  
  7. try:
  8. remote_conn_pre.connect('1.111.111.111', username=username, password=password)
  9. except paramiko.ssh_exception.AuthenticationException:
  10. print ("Erro de login.")
  11.  
  12. File "run.py", line 67, in <module>
  13. remote_conn_pre.connect(ip, username=username, password=password)
  14. File "C:Python27libsite-packagesparamikoclient.py", line 380, in connect
  15. look_for_keys, gss_auth, gss_kex, gss_deleg_creds, gss_host)
  16. File "C:Python27libsite-packagesparamikoclient.py", line 603, in _auth
  17. raise saved_exception
  18. paramiko.ssh_exception.AuthenticationException: Authentication failed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement