How to optimize SSH connection

There are 3 options

UseDNS no

GSSAPIAuthentication no

ignoreRhosts yes

In file /etc/nsswitch.conf,you can only modify the configuration from

“hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4” to “hosts: files dns”,

This changes will stop mdns,and only use dns to reslove hostname;

Then you can restart ssh service.

/etc/init.d/sshd restart

Leave a Reply