Linux · 2008-11-13

SSH连接Debian出现延迟的解决方法

我用SecureCRT连接Debian的时候,间隔一段时间没去动,再切换回去的时候,输入总是会延迟,不过不是一直持续的延迟,只是刚连上去1-10秒的时间,虽然不是什么大的问题,但是总觉得很不舒服,google 了半天,问了一个同事,终于把问题解决了!
把nsswitch.conf里的hosts该成
hosts: files dns [NOTFOUND=return]


debian:~# cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference’ and `info’ packages installed, try:
# `info libc “Name Service Switch”‘ for information about this file.

passwd: ***
group: ***
shadow: ***

hosts: files dns [NOTFOUND=return]

networks: ***
protocols: ***
services: ***
ethers: ***
rpc: ***

netgroup: ***