Problem with long sshd pre-login banners

Bug #300536 reported by Jay Smith
2
Affects Status Importance Assigned to Milestone
paramiko
Fix Released
Medium
Robey Pointer

Bug Description

I'm trying to use Paramiko to automate ssh connections to a machine that happens to have a somewhat long ssh pre-login banner (16 lines, 103 characters). Paramiko fails trying to parse the protocol version because of the banner length. Below are my changes to get this working.

$ diff mypacket.py /var/lib/python-support/python2.5/paramiko/packet.py
271c271
< buf = self.__remainder
---
> buf = ''
275c275
< self.__remainder = buf[n+1:]
---
> self.__remainder += buf[n+1:]
$ diff mytransport.py /var/lib/python-support/python2.5/paramiko/transport.py
1590c1590
< for i in range(100):
---
> for i in range(5):

Tags: banner sshd
Revision history for this message
Robey Pointer (robey) wrote :

thanks for the patch! applied.

Changed in paramiko:
assignee: nobody → robey
importance: Undecided → Medium
milestone: none → 1.7.5
status: New → Fix Committed
Robey Pointer (robey)
Changed in paramiko:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.