3.3 - 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 in sshd_config.
- 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 in sshd_config.
解決的方法, 修改 /etc/ssh/sshd_conf 裡面
UseDNS no
小於 3.7.1 版之前的請改
VerifyReverseMapping no
更早之前的如 2.9.9p2
ReverseMappingCheck no
* Replaced sshd(8)'s VerifyReverseMapping with UseDNS option.
When UseDNS option is on, reverse hostname lookups are always
performed.
When UseDNS option is on, reverse hostname lookups are always
performed.
沒有留言:
張貼留言