Guest User

Untitled

a guest
Dec 13th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. $ ssh myuser@remoteserver.com
  2. Duo two-factor login for myuser
  3.  
  4. Enter a passcode or select one of the following options:
  5.  
  6. 1. Duo Push to +XXX XX-XXX-1111
  7. 2. Phone call to +XXX XX-XXX-1111
  8. 3. SMS passcodes to +XXX XX-XXX-1111
  9.  
  10. Passcode or option (1-3): 1
  11. Success. Logging you in...
  12.  
  13. import paramiko
  14.  
  15. ssh = paramiko.SSHClient()
  16. ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  17.  
  18. ssh.connect('remoteserver.com', port=22, username='myuser', password='mypassword')
  19. stdin, stdout, stderr = ssh.exec_command('ls -l')
  20. output = stdout.readlines()
  21. print(output)
  22.  
  23. paramiko.ssh_exception.AuthenticationException: Authentication failed.
Add Comment
Please, Sign In to add comment