less than 1 minute read

The SSH Permission denied error appears when trying to SSH into a server:

Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
# /etc/ssh/sshd_config
PasswordAuthentication yes
ChallengeResponseAuthentication no
PermitRootLogin no
PubkeyAuthentication yes
# GSSAPIAuthentication yes
# GSSAPICleanupCredentials no
UsePAM yes

restart sshd

systemctl restart sshd

permission

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

ssh-permission-denied-publickey

sshd_config