Alex Ross bio photo

Alex Ross

I'm an Engineer at Base and play the baritone saxophone!

Email Twitter Github Stackoverflow

By default the CentOS SSH server configuration comes with GSSAPIAuthentication enabled - this supports SSH login via Kerberos.

Disabling GSSAPIAuthentication will stop the SSH server trying to connect to a Kerberos server for authentication.

Server Side Solution

Here are a few Ansible Playbook examples for you to use.


You need to change the GSSAPIAuthentication yes line in /etc/sshd/sshd_config to GSSAPIAuthentication no:

name: "Disable GSSAPIAuthentication for SSH login"
    regexp: "^GSSAPIAuthentication"
    line: "GSSAPIAuthentication no"
    state: "present"
    dest: "/etc/sshd/sshd_config"


You can also try disabling reverse DNS lookup on SSH login:

name: "Disable reverse DNS lookup on SSH login"
    line: "useDNS no"
    state: "present"
    dest: "/etc/sshd/sshd_config"

Client Side Solution

You can try disabling GSSAPIAuthentication in your ~/.ssh/config file:

Host *
  GSSAPIAuthentication no