Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

a newbie sshd debugging question

43 views
Skip to first unread message

John Floren

unread,
Dec 20, 2007, 3:06:19 PM12/20/07
to
Hi everyone
I'm in the process of porting ssh2 to Plan 9, but there's a problem. I
can currently log in and run a few commands, but after a very small
number of commands (or simply striking return a few times), the server
tells the client that we sent a bad packet size and we exit.
To debug this, I've got the client showing the plaintext packets it's
sending, but I don't know what the server is reading. I *just*
downloaded the source and built sshd on Unix to test this, but I don't
know where the received packets are being decrypted and gdb is not
playing nicely at this time... can someone tell me where the
decryption happens so I can drop in a print statement?
Thanks


John
--
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn
_______________________________________________
openssh-unix-dev mailing list
openssh-...@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

Darren Tucker

unread,
Dec 20, 2007, 3:17:22 PM12/20/07
to
John Floren wrote:
> Hi everyone
> I'm in the process of porting ssh2 to Plan 9, but there's a problem. I
> can currently log in and run a few commands, but after a very small
> number of commands (or simply striking return a few times), the server
> tells the client that we sent a bad packet size and we exit.
> To debug this, I've got the client showing the plaintext packets it's
> sending, but I don't know what the server is reading. I *just*
> downloaded the source and built sshd on Unix to test this, but I don't
> know where the received packets are being decrypted and gdb is not
> playing nicely at this time... can someone tell me where the
> decryption happens so I can drop in a print statement?

For OpenSSH, look for PACKET_DEBUG in packet.c. You might want to try
building sshd ./configure --with-cflags=-DPACKET_DEBUG first and see if
that does what you want.

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

John Floren

unread,
Dec 20, 2007, 6:02:38 PM12/20/07
to
On Dec 20, 2007 12:15 PM, Darren Tucker <dtu...@zip.com.au> wrote:
>
> John Floren wrote:
> > Hi everyone
> > I'm in the process of porting ssh2 to Plan 9, but there's a problem. I
> > can currently log in and run a few commands, but after a very small
> > number of commands (or simply striking return a few times), the server
> > tells the client that we sent a bad packet size and we exit.
> > To debug this, I've got the client showing the plaintext packets it's
> > sending, but I don't know what the server is reading. I *just*
> > downloaded the source and built sshd on Unix to test this, but I don't
> > know where the received packets are being decrypted and gdb is not
> > playing nicely at this time... can someone tell me where the
> > decryption happens so I can drop in a print statement?
>
> For OpenSSH, look for PACKET_DEBUG in packet.c. You might want to try
> building sshd ./configure --with-cflags=-DPACKET_DEBUG first and see if
> that does what you want.
>
> --
> Darren Tucker (dtucker at zip.com.au)
> GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
> Good judgement comes with experience. Unfortunately, the experience
> usually comes from bad judgement.
>

Great, thanks! Now, as debugging progresses... can someone tell me
what packet type 5d is? (or show me some docs that contain the
definition)


John
--
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn

0 new messages