Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- username = raw_input("Username:")
- password = getpass.getpass("Password: ")
- remote_conn_pre = paramiko.SSHClient()
- remote_conn_pre.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- try:
- remote_conn_pre.connect('1.111.111.111', username=username, password=password)
- except paramiko.ssh_exception.AuthenticationException:
- print ("Erro de login.")
- File "run.py", line 67, in <module>
- remote_conn_pre.connect(ip, username=username, password=password)
- File "C:Python27libsite-packagesparamikoclient.py", line 380, in connect
- look_for_keys, gss_auth, gss_kex, gss_deleg_creds, gss_host)
- File "C:Python27libsite-packagesparamikoclient.py", line 603, in _auth
- raise saved_exception
- paramiko.ssh_exception.AuthenticationException: Authentication failed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement