paramiko keyboard Interactive authentication only

Viewed 227

i try paramiko to connect jumphost but get authentication failed below is code

import paramiko
import time
addresss = '192.168.1.1'
username = 'jumphost'
password = 'jumphostx'

sshclient = paramiko.SSHClient()
sshclient.set_missing_host_key_policy(paramiko.AutoAddPolicy())
sshclient.connect(addresss, username=username, password=password, look_for_keys=False, allow_agent=False)
conn = sshclient.invoke_shell()
output = conn.recv(100000000)
print output
command = 'bash'
conn.send('%s\n' %command)
time.sleep(10)
output = conn.recv(100000)
print output

and get error like this

Traceback (most recent call last):
File "login1.py", line 10, in <module>
  sshclient.connect(addr, username=username, password=password, look_for_keys=False, allow_agent=False)
File "D:\program file\python27\lib\site-packages\paramiko\client.py", line 446, in connect
  passphrase,
File "D:\program file\python27\lib\site-packages\paramiko\client.py", line 764, in _auth
  raise saved_exception
paramiko.ssh_exception.AuthenticationException: Authentication failed.

i already try ssh use securecrt and success fully, but what happen if i use paramiko get error

below is my setting on secure crt

enter image description here

if i check all authentication checklist ssh is fail, if i check only keyboard interactive ssh is successfuly please correct my code thanks

0 Answers
Related