Sample Header Ad - 728x90

sshd: Server refused public-key signature despite accepting key

0 votes
1 answer
1525 views
I am renting a VPS running CentOS Stream 8, for which I set up SSH pubkey authentication for the user "foo". I access it via PuTTY on Windows. Recently I rented another VPS running Rocky Linux 9, and I set up sshd in an identical way, then copying the /home/foo/.ssh/authorized_keys file from the old VPS to the new one. In this way I had just to clone the PuTTY profile configuration, changing only the IP address from the old to the new one, and reusing PuTTY's PPK key. However, when I SSH to the new server via PuTTY, I get the error: Using username "foo". Authenticating with public key "foo@newvps.example.com" Server refused public-key signature despite accepting key! Using keyboard-interactive authentication. Password: and I have to enter "foo" user's password. However, I'd like to ditch password-based authentication, as in the old server. The private and public keys are the same on both ends. SELinux is not interfering here. Permissions of ~/.ssh and ~/.ssh/authorized_keys are correct. Note that SSHing in via pubkey from the new server to itself works perfectly. Clearly in this case it uses id_rsa, not PuTTY's PPK key. dmesg and /var/log/messages do not show anything useful. What could be the problem? Note: this is not a duplicate of https://unix.stackexchange.com/questions/282908/server-refused-public-key-signature-despite-accepting-key-putty , as none of the answers apply.
Asked by dr_ (32068 rep)
Jun 14, 2024, 03:01 PM
Last activity: Jun 15, 2024, 07:31 PM