Login with SSH-Keys is failing due the following error "userauth_pubkey: key type ssh-dss not in PubkeyAcceptedKeyTypes [preauth]"
Issue
- Unable to login using
ssh-keys
Apr 7 11:58:02 examplehost sshd[983201]: Connection from 192.168.0.211 port 52306 on 192.242.130.89 port 22
Apr 7 11:58:02 examplehost sshd[983201]: userauth_pubkey: key type ssh-dss not in PubkeyAcceptedKeyTypes [preauth]
Apr 7 11:58:02 examplehost sshd[983201]: userauth_pubkey: key type ssh-dss not in PubkeyAcceptedKeyTypes [preauth]
Apr 7 11:58:02 examplehost sshd[983201]: Failed publickey for userbob from 192.168.0.211 port 52306 ssh2: RSA SHA256:PiwOSbk+...........
Apr 7 11:58:02 examplehost sshd[983201]: Failed publickey for userbob from 192.168.0.211 port 52306 ssh2: RSA SHA256:PiwOSbk+...........
Apr 7 11:58:02 examplehost sshd[983201]: Postponed keyboard-interactive for userbob from 192.168.0.211 port 52306 ssh2 [preauth]
Apr 7 11:58:02 examplehost sshd[983201]: Postponed keyboard-interactive for userbob from 192.168.0.211 port 52306 ssh2 [preauth]
- Key based authentication failing after disabling the weaker cipher/algorithms:
Nov 28 10:21:05 examplehost sshd[3074064]: userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedKeyTypes [preauth]
Nov 28 10:21:06 examplehost sshd[3074108]: pam_sss(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh rhost=10.0.0.10 user=userA
- Unable to login to the system over
SSHusing public key. GettingPermission deniederror:
[root@hostname ~]# ssh -i ~/.ssh/id_rsa root@192.168.1.1
root@192.168.1.1: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Environment
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- SSH
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.