S
sa6113
I am using this code to connect to a windows machine using paramiko, I have
installed sshd on the machine and it works properly:
sock.connect((hostname, port))
t = paramiko.Transport(sock)
event = threading.Event()
t.start_client(event)
event.wait()
if not t.is_active():
print 'SSH negotiation failed.'
sys.exit(1)
else:
print "SSH negotiation sucessful"
event.clear()
t.auth_password(username=username, password=password,event=event)
if not t.is_authenticated():
print "Authentication failed"
output:
SSH negotiation successful
Authentication failed
I uploaded log file I am sure about username and password on that machine.
What is the problem?
installed sshd on the machine and it works properly:
sock.connect((hostname, port))
t = paramiko.Transport(sock)
event = threading.Event()
t.start_client(event)
event.wait()
if not t.is_active():
print 'SSH negotiation failed.'
sys.exit(1)
else:
print "SSH negotiation sucessful"
event.clear()
t.auth_password(username=username, password=password,event=event)
if not t.is_authenticated():
print "Authentication failed"
output:
SSH negotiation successful
Authentication failed
I uploaded log file I am sure about username and password on that machine.
What is the problem?