How to speed up SSH authentication
SSH enables you to log in to a remote host securely, primarily by system administrators. The log-in process could be slow or is not fast enough for you. The slowness adds up if you need to log in many times a day remotely as part of your daily job.
There are a few ways to speed up authenticating to a remote SSH server which you can implement from both the client and server-side.
Steps to speed up SSH authentication:
-
Disable reverse DNS lookup for SSH server.
SSH server could be configured to perform a reverse DNS lookup of incoming connection which could delay the log in process.
-
Disable GSSAPI authentication on SSH server.
SSH server might have to check if you're using GSSAPI authentication even if you're conecting via other authentication method.
-
Share and reuse SSH connection via multiplexing.
multiplexing allows sharing and reuse of SSH connection which could significantly speed up remote SSH server access.
Related: How to use multiplexing in SSH
-
Manually specify authentication method from SSH client.
SSH client will try multiple authentication methods unless manually specified.
-
Use passwordless authentication method.
Not having to manually key in username and password during log in will speed up SSH authentication.
Related: How to SSH without password