I have a Cygwin machine that runs sshd.
When I try to login the machine with SSH, it takes a while to get a response.
With the command ssh -v user@cygwin
, I see that there are two commands that takes minutes.
debug1: Reading configuration data /etc/ssh_config debug1: Connecting to pspc [10.0.40.177] port 22. debug1: Connection established. debug1: identity file /Users/smcho/.ssh/identity type -1 debug1: identity file /Users/smcho/.ssh/id_rsa type -1 debug1: identity file /Users/smcho/.ssh/id_dsa type -1 <---
And
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3 debug1: match: OpenSSH_5.3 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.2 debug1: SSH2_MSG_KEXINIT sent <---
After some Googling, I think it is caused by windows port 113 being firewalled.
(http://www.cygwin.com/ml/cygwin/2009-03/msg00380.html)
How can I solve this problem? How can I return from identify
and SSH2_...IT sent
quickly?
Best Answer
Apart from indeed opening up
IDENT
port 113 towards the SSH client (so the server can try to connect to that), you might have some luck addingUseDNS no
tosshd_config
.And I doubt it will help you (the client knows where to find the server, so it's not the 1st bullet, you tried the 2nd bullet, and the delays are longer than 10 seconds so the other bullets don't apply), but for the archives the OpenSSH FAQ states: