paramiko.SSHException : No existing session ???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sa6113

    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(s ocket.AF_INET, socket.SOCK_STR EAM)
    sock.connect_ex ((hostname, port))
    except Exception, e:
    print 'Connect failed: ' + str(e)
    traceback.print _exc()
    sys.exit(1)

    t = paramiko.Transp ort(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.SSHExc eption : 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.SSHEx...p19822257.html
    Sent from the Python - python-list mailing list archive at Nabble.com.

  • Lawrence D'Oliveiro

    #2
    Re: paramiko.SSHExc eption : No existing session ???

    In message <mailman.2007.1 223197192.3487. python-list@python.org >, sa6113
    wrote:
    print "doing authentication"
    ....
    >
    -----------------
    the result is :
    ....
    donig authentication
    Interesting that these two don't match up. When you're supposed to copy and
    paste, you should copy and paste, not type it in.

    Comment

    • sa6113

      #3
      Re: paramiko.SSHExc eption : No existing session ???


      My problem is in password authentication.


      Lawrence D'Oliveiro wrote:
      >
      In message <mailman.2007.1 223197192.3487. python-list@python.org >, sa6113
      wrote:
      >
      >print "doing authentication"
      ...
      >>
      >-----------------
      >the result is :
      ...
      >donig authentication
      >
      Interesting that these two don't match up. When you're supposed to copy
      and
      paste, you should copy and paste, not type it in.
      --

      >
      >
      --
      View this message in context: http://www.nabble.com/paramiko.SSHEx...p19832282.html
      Sent from the Python - python-list mailing list archive at Nabble.com.

      Comment

      Working...