# Remove existing GSSAPIAuthentication and UseDNS lines to prevent duplicates sed -i '/^GSSAPIAuthentication/d' /etc/ssh/sshd_config sed -i '/^UseDNS/d' /etc/ssh/sshd_config
# Disable GSSAPIAuthentication and UseDNS cat >>/etc/ssh/sshd_config <<EOF GSSAPIAuthentication no UseDNS no EOF