Last Updated: February 25, 2016
· mattwillsh

Speed up SSH logon by disabling GSSAPIAuthentication


Connecting the SSH servers can sometimes be delayed when the client and server try to sort out if they should be using GSSAPI to authenticate. You can see if this the case by running:

ssh -vvv <yourserveraddress>

If you see mention of GSSAPI in the output and things slow down, disabling GSSAPI might help. It's unlike you'll need it if you don't know you need it, if you see what I mean :)

On the client side you can add the following to your $HOME/.ssh/config file:

Host *
  GSSAPIAuthentication no

To disable GSSAPI authentication on the server, as root, edit /etc/ssh/sshd_config. Change the yes on the GSSAPIAuthentication line to no. Save your changes and exit your editor, then run, as root:

# service ssh reload

If you're running Fedora, RHEL or CentOS replace ssh with sshd in the above command.

3 Responses
Add your response


At least under CEntOS it would be:

service sshd reload

(I think the same is true for Debian)

over 1 year ago ·

The tip was written with Ubuntu in mind as I've only had this problem there. 'ssh' is correct there. I've updated the tip with a comment about using sshd for RH based distros.

over 1 year ago ·

For all hosts, you don't need to put a Host * entry, just put it near the top of the file

over 1 year ago ·
Filed Under