Slow SSH Login | GSSAPIauthentication

Problem: When SSH’ing into a server, connection, and login take a long time.

  • Connect to a server

Screen Shot 2017-11-07 at 11.11.19 AM

  • Attempt to log in, and wait to see how long the connection takes.
    • 10+ seconds is too long and should be investigated.
  • Wait for the password prompt and then proceed to  cat /etc/ssh/sshd_config | less
    • You’re looking for GSSAPIauthentication. Check to see if it has a yes or no next to it. If it has a yes, then that could be why it’s slow. If it says no, then that isn’t the problem.

Screen Shot 2017-11-07 at 11.30.58 AM

  • use vi to edit the sshd_config file.
    • If you are still in the root directory, then you will need to use the following path vi /etc/ssh/sshd_config
  • Once in, find GISSAPIauthenticati and edit it to say “no” instead of “yes”.

Screen Shot 2017-11-07 at 11.25.20 AM

  • After you have edited the config file, you will need to restart the sshd service.
  • Save and Exit Vi editor
  • Now, restart ssh with the following command  systemctl restart sshd
    • Then check the status of SSHD with systemctl status sshd

Screen Shot 2017-11-07 at 11.29.54 AM

  • Once done, exit and try to reconnect to the server. See if disabling GSSAPIauthentication solved the issue

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s