paramiko.SSHException : No existing session ???
sa6113
s.payandeh at gmail.com
Sun Oct 5 06:10:34 EDT 2008
I use this code :
hostname = "192.168.1.4"
username = "test"
port = 22
password = '123456'
# now connect
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect_ex((hostname, port))
except Exception, e:
print 'Connect failed: ' + str(e)
traceback.print_exc()
sys.exit(1)
t = paramiko.Transport(sock)
event = threading.Event()
t.start_client(event)
print "started client"
event.wait(15)
if not t.is_active():
print 'SSH negotiation failed.'
sys.exit(1)
else:
print "SSH negotiation sucessful"
print "doing authentication"
t.auth_password(username, password, event)
event.clear()
event.wait(20)
-----------------
the result is :
started client
ssh negotiation sucessful
donig authentication
....
paramiko.SSHException : No existing session
-------------------
I am sure that the username and password exists properly.
what is the problem??
--
View this message in context: http://www.nabble.com/paramiko.SSHException-%3A-No-existing-session-----tp19823051p19823051.html
Sent from the Python - python-list mailing list archive at Nabble.com.
More information about the Python-list
mailing list