Score:0

Server Refused our Key after upgrading to Ubuntu v22

cn flag

I upgraded our webserver to Ubuntu v22 and am now unable to login via Putty after restart, it says "Server Refused our Key," and a prompt "Disconnected: No supported authentication methods available (Server sent: publickey)." It was working fine before this.

I can still login using the same private key using FileZilla / SFTP.

After the restart the server did not start my webserver and the website is down, so any help you can provide I will be grateful.

ar flag
Does this answer your question? [Ubuntu 22.04 SSH the RSA key isn't working since upgrading from 20.04](https://askubuntu.com/questions/1409105/ubuntu-22-04-ssh-the-rsa-key-isnt-working-since-upgrading-from-20-04)
Waqas Tariq avatar
cn flag
Yes, I am using RSA Key. I have read this, but my server is on Lightsail, and how can I change the key, when I have no access to putty?
Waqas Tariq avatar
cn flag
Hahaha...Unfortunately, I can't do that as it's with Amazon. I will use my backup that I created, and boot a new instance. Thank you for your time.
Waqas Tariq avatar
cn flag
Can you provide a solution here, as to what I need to do before upgrading my instance again?
ar flag
AWS has it's portal that allows access to the VM hosted there. Spin up the new instance from backup of the 20.04 server. Create a new public private key pair as described in the linked answer. Send the new public key to the server. Move the old private key to a different location. Test if you can ssh using the new key pair. Upgrade server to 22.04 and test again. Rinse and repeat.
ar flag
You may find [this AWS help page](https://docs.aws.amazon.com/opsworks/latest/userguide/security-ssh-access.html) helpful.
Score:3
ws flag

I upgrade my digitalocean droplet from ubuntu 18.04 to 20.04 to 22.04. There is no problem on my putty ssh at 20.04. but "refused our key" when I upgraded to 22.04.

I fix the problem after update my putty from 0.74 to 0.78.

https://www.systemtek.co.uk/2019/03/how-to-update-putty/

hope this could help.

lucasvw avatar
in flag
I was also having trouble connecting to an Ubuntu 22.04, and upgrading putty worked
busytraining avatar
bn flag
Funny, I went through the exact same process and had the exact same versions as you. Your fix worked. I also followed your link, I did not get a pop-up asking my to keep my Putty data, but it still saved it when 0.79 got installed.
Score:2
cn flag

I created an ED25519 key, and then used FileZilla to access /home/ubuntu/.ssh to replace the key and change file permission to 600. This gave me access to the server

Score:0
sv flag

I ran into the same issues with Ubuntu Mate 20.04 to 22.04 upgrade. Every time I tried to access the server through SSH I keep getting "key is refused". I could still access the server with WinSCP.

I was able to fix the issue by just upgrading Kitty (a fork of Putty).

So for anyone else that runs into this issue in the future, first try upgrading your SSH Client.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.