a newbie sshd debugging question

Darren Tucker dtucker at zip.com.au
Fri Dec 21 07:15:19 EST 2007


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.


More information about the openssh-unix-dev mailing list