Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ ssh myuser@remoteserver.com
- Duo two-factor login for myuser
- Enter a passcode or select one of the following options:
- 1. Duo Push to +XXX XX-XXX-1111
- 2. Phone call to +XXX XX-XXX-1111
- 3. SMS passcodes to +XXX XX-XXX-1111
- Passcode or option (1-3): 1
- Success. Logging you in...
- import paramiko
- ssh = paramiko.SSHClient()
- ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- ssh.connect('remoteserver.com', port=22, username='myuser', password='mypassword')
- stdin, stdout, stderr = ssh.exec_command('ls -l')
- output = stdout.readlines()
- print(output)
- paramiko.ssh_exception.AuthenticationException: Authentication failed.
Add Comment
Please, Sign In to add comment