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
name: "Disable GSSAPIAuthentication for SSH login" lineinfile: 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" lineinfile: line: "useDNS no" state: "present" dest: "/etc/sshd/sshd_config"
Client Side Solution
You can try disabling GSSAPIAuthentication in your
Host * GSSAPIAuthentication no