Guest User

Untitled

a guest
Jul 20th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. hostname = 'remotehostname.com'
  2. username= 'AB1239'
  3. password= ‘password’
  4. port = 10022
  5.  
  6. import paramiko
  7. c = paramiko.SSHClient()
  8. c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  9. c.connect(hostname=hostname, username=username, password=password,port=port)
  10. Traceback (most recent call last):
  11. File "<stdin>", line 1, in <module>
  12. File "/usr/lib/python2.7/site-packages/paramiko/client.py", line 380, in connect
  13. look_for_keys, gss_auth, gss_kex, gss_deleg_creds, gss_host)
  14. File "/usr/lib/python2.7/site-packages/paramiko/client.py", line 597, in _auth
  15. raise saved_exception
  16. paramiko.ssh_exception.AuthenticationException: Authentication failed.
  17.  
  18.  
  19. I am using:
  20. >>> print paramiko.__version__
  21. 1.16.1
Add Comment
Please, Sign In to add comment