“Server refused our key”
On my new Rocky 9 installation I have the same procedure as on Rocky 8. Under Rocky 8 works well but on Rocky 9 returned “Server refused our key”.
On my Putty local pc, I generate the keys and copy-paste the public key to the Rocky server.
Rocky 8 and Rocky 9
cd $HOME/
mkdir .ssh
cd .ssh
vim authorized_keys (Add public server key)
chmod 700 /root/.ssh
chmod 600 /root/.ssh/authorized_keys
restorecon -R -v /root/.ssh
systemctl restart sshd
Any ideas about what I need to do on Rocky 9?
Hi @pata2004, When copying and pasting a key, you can sometimes get unintended consequences. Take a look at this post that reflects your issue and let me know if on further inspection, you find an error in the key file: ssh - Putty: Getting Server refused our key Error - Stack Overflow
Steve
Upgrading Putty to 0.78 (the last version) solved the issue.
Thanks @sspencerwire, I followed your link, and lead me to another link where I found the solution.
I found the solution on openssh - SSH server gives "userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]" when connecting with Putty - Unix & Linux Stack Exchange
Thanks very much, @sspencerwire and @jlehtone for your great help