[paramiko] Testing an exception
jay
titleistfour at gmail.com
Tue Aug 7 10:44:59 PDT 2007
Thanks Todd. Its interesting that I was connected to an ssh server on port
22. Nothing non standard about that. Could this also be a timeout related
exception? If the remote server is slow to respond?
Jay
On 8/7/07, Todd Whiteman <toddw at activestate.com> wrote:
>
> Hi Jay,
>
> You get this exception from connecting to a remote machine on a non-ssh
> port, so when Paramiko tries to read in the relevant SSH information, it
> fails and raises the SSHException you received.
>
> A simple repro example is to try and connect to the ftp port (port 21)
> instead of the SSH port (port 22).
>
> Cheers,
> Todd
>
> jay wrote:
> > Hello,
> >
> > Like to start off saying paramiko is fantastic and has been a huge time
> > saver for me at work. Thanks for the hard work!
> >
> > I got the following traceback and am unsure what the problem is.
> >
> > Traceback (most recent call last):
> > File "ATM.py", line 115, in <module>
> > t.connect(username=sftpRemoteUser, password=sftpRemotePassword)
> > File
> >
> "/usr/local/python251/lib/python2.5/site-packages/paramiko/transport.py",
> > line 931, in connect
> > self.start_client()
> > File
> >
> "/usr/local/python251/lib/python2.5/site-packages/paramiko/transport.py",
> > line 398, in start_client
> > raise e
> > SSHException: Error reading SSH protocol banner
> >
> > I thought my code would catch all exceptions, but apparently not. This
> > particular problem showed up inside this
> >
> > try:
> > except Exception, e:
> >
> > So, I would like to try and duplicate it, but I'm not even sure what the
> > problem was. Any suggestions on how to duplicate this problem and make
> > sure the code catches it? Thanks
> >
> > Jay
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > paramiko mailing list
> > paramiko at lag.net
> > http://mail.lag.net/mailman/listinfo/paramiko
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.lag.net/pipermail/paramiko/attachments/20070807/ebb6956f/attachment.htm
More information about the paramiko
mailing list