Logons are slow and the logon speed is normal after logon. There are two possible causes: 1. DNS reverse resolution
OpenSSH will verify the IP address when you log on. It uses reverse DNS to locate the host name based on the user's IP address, then uses DNS to locate the IP address, and finally matches whether the logon IP address is valid. If the IP address of the client does not have a domain name, or the DNS server is slow or inaccessible, it will take a long time to log on.
Solution:
You only need to modify/etc/ssh/sshd_config and set UseDNS to no:
Sed-I "s/# UseDNS yes/UseDNS no/"/etc/ssh/sshd_config
2. gssapi Problems
Use ssh-v user @ server to view the following information during logon:
Debug1: Next authentication method: gssapi-with-mic
Debug1: Unspecified GSS failure. Minor code may provide more information
Solution:
You can use ssh-o GSSAPIAuthentication = no user @ server to log on.
You can also modify/etc/ssh/ssh_config and set GSSAPIAuthentication no. Last/init. d/sshd restart/init. d/sshd restart