paramiko.SSHException : No existing session ???




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.

.



Relevant Pages

  • paramiko.SSHException : No existing session ???
    ... sock.connect_ex((hostname, port)) ... print "SSH negotiation sucessful" ... I am sure that the username and password exists properly. ...
    (comp.lang.python)
  • Re: SharePoint Issues on SBS
    ... You didn't have to add a separate IP so you can use port 80. ... As far as getting prompted or username and password, go to the 'Properties' page of the site, 'Directory Security' tab and click 'Edit' under 'Authentication and access control'. ... The request for user id and password from the application that opens a document, is something that you can't avoid the first time a document opens up. ... address to the NIC and configured the new sharepoint site to that IP. ...
    (microsoft.public.windows.server.sbs)
  • Re: Need help with InternetOpenUrl
    ... webpage (port 88) on my server that is on a different port, ... I would love to be able to have my app open that page with username ... use InternetConnect / HttpOpenRequest / ...
    (microsoft.public.vc.language)
  • Re: Controlling port blocking with web interface
    ... >I get many malicious login attempts to my ssh server every day. ... >show up in my logs and annoy me. ... piped into mimencode to get username _AND_ password). ... Don't run your SSHD on the "standard" port, ...
    (comp.os.linux.networking)
  • authenticated problem for paramiko
    ... I am using this code to connect to a windows machine using paramiko, ... installed sshd on the machine and it works properly: ... sock.connect((hostname, port)) ... print "SSH negotiation sucessful" ...
    (comp.lang.python)