Além de realmente abrir IDENT
port 113 em direção ao cliente SSH (para que o servidor possa tentar se conectar a ele), você pode ter alguma sorte adicionando UseDNS no
a sshd_config
.
E eu duvido que isso ajude você (o cliente sabe onde encontrar o servidor, então não é o primeiro marcador, você tentou o segundo marcador, e os atrasos são maiores que 10 segundos, então os outros marcadores não se aplicam) , mas para os arquivos o FAQ do OpenSSH afirma:
ssh(1) takes a long time to connect or log in
Large delays (more that 10 seconds) are typically caused a problem with name resolution:
- Some versions of glibc (notably glibc 2.1 shipped with Red Hat 6.1) can take a long time to resolve "IPv6 or IPv4" addresses from domain names. This can be worked around with by specifying
AddressFamily inet
option inssh_config
. [On the client; AvB.]- There may be a DNS lookup problem, either at the client or server. You can use the nslookup command to check this on both client and server by looking up the other end's name and IP address. In addition, on the server look up the name returned by the client's IP-name lookup. You can disable most of the server-side lookups by setting
UseDNS no
insshd_config
. [On the server, AvB.]Delays less than 10 seconds can have other causes.
- OpenSSH releases prior to 3.8 had an
moduli
file with moduli that were just smaller than what sshd would look for, and as a result, sshd would end up using moduli significantly larger than requested, which resulted in a speed penalty. Replacing themoduli
file will resolve this (note that in most cases this file will not be replaced during an upgrade and must be replaced manually).- OpenSSH releases prior to 3.8 had a flaw in
ssh
that would cause it to request moduli larger than intended (which when combined with the above resulted in significant slowdowns). Upgrading the client to 3.8 or higher will resolve this issue.If either the client or server lack a kernel-based random number device (eg Solaris < 9, AIX < 5.2, HP-UX < 11.11) and no substitute is available (eg prngd) it's possible that one of the programs called by
ssh-rand-helper
to generate entropy is hanging. This can be investigated by running it in debug mode:/usr/local/libexec/ssh-rand-helper -vvvAny significant delays should be investigated and rectified, or the corresponding commands should be removed from ssh_prng_cmds.