[CentOS] how to debug ssh slow connection issues.

Fri May 23 17:05:31 UTC 2008
Paul Heinlein <heinlein at madboa.com>

On Fri, 23 May 2008, Jason Pyeron wrote:

> I do not have any ideas on this.
> Where should I start. [... lots and lots of snippage ...]

When sshd looks to be the culprit, my troubleshooting begins by 
launching it in foreground mode on a non-standard port on the server:

   sshd -ddd -p 2222

On the client, do

   ssh -p 2222 your.server

If that doesn't provide good info, wrap sshd in strace:

   strace -o /tmp/sshd-trace.txt sshd -d -p 2222

The strace output will show where the delays are occuring. (You can 
modify timestamp info in the strace output. See the man page for 

Paul Heinlein <> heinlein at madboa.com <> http://www.madboa.com/