userauth_pubkey: signature algorithm ssh-rsa not in PubkeyAcceptedAlgorithms
userauth_pubkey: signature algorithm ssh-rsa not in PubkeyAcceptedAlgorithms
1. Login to server and tail /var/log/secure to check errors. Refer below example.
[email protected] ~]# tail -f /var/log/secure
userauth_pubkey: signature algorithm ssh-rsa not in PubkeyAcceptedAlgorithms
2. Find which key type is used in the server by running the below command.
[email protected] ~]# ssh-keygen -l -f /usr/local/etc/ezlogin/id_key.pub
4096 SHA256:n4lmX53/gwkKB4+nSQ30hZXxXK+DRG1LPc7N1KN/1Ag ezlogin (RSA)
In the above example, the RSA key type is used.
3. Run the following command to see which all key types are enabled on the server.
[email protected] ~]# sshd -T | grep -i key
pubkeyacceptedalgorithms [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256
4. Open /etc/ssh/sshd_config and append the below line to enable ssh-rsa.
[email protected] ~]# vim /etc/ssh/sshd_config
PubkeyAcceptedKeyTypes +ssh-rsa
[email protected] ~]# systemctl restart sshd
5. Re-run the below command and confirm that ssh-rsa has been enabled.
[email protected] ~]# sshd -T | grep -i key
pubkeyacceptedalgorithms [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa
6. Try to modify the user now and confirm it's working fine.