SSH no longer works with RSA keys.

Jul 15, 2022 Last reply: 4 years ago 8 Replies

Apparently, RSA is insecure, so some time ago it was deprecated for use with SSH. It is now actually disabled as of Ubuntu 22.04.



All of which I only discovered after upgrading my rPi to Ubuntu 22.04, i.e I was left scratching my head, figuring out why my long term existing SSH RSA key was now being rejected.



The solution was to generate a new key pair using Ed25519 instead of RSA.



If it has already changed for Ubuntu, presumably Pi OS will soon follow.



Is it truly disabled? Or is it just the new default of not using it?

Check out the OpenSSH Legacy Options page. I've been able to re-enable support for older methods using command line options / config file tweaks.

Link - OpenSSH: Legacy Options -

formatting link

You shouldn't need to reboot. You should be able to restart the SSH daemon independently, without a reboot.

Well, of course, but if a user can't even google their problem and a possible solution, then restarting a service might also be too much to ask. Reboot is much easier and also works ¯\_(ツ)_/¯

Sometimes I really hate it when people are correct. This is one of those times. *HEAVYsigh*

You see, I would say force-reload, just to be sure (reloads if possible, otherwise restarts). But also, I am not sure if any other services depend on that config change. Probably not, but again, just to be sure... Is every service completely self-contained under systemd? I'm not an admin so I don't know. If I were behind the keyboard I would try to reload and test if it works. Ah well.

lol Except that it's "service sshd", not "service ssh", so the user would get an error and be confused. Or even better, they might have systemd. That just reinforces that it's simpler for the unknowing to reboot. The knowing likely don't need the instructions for how to restart the service, just a reminder to do so.

Nope, not on systemd at least where it should be ssh.

Depends on distro I guess. On CentOS, it's

# systemctl status ssh Unit ssh.service could not be found. # systemctl status sshd ● sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled) Docs: man:sshd(8) man:sshd_config(5) Main PID: 974 (sshd) CGroup: /system.slice/sshd.service └─974 /usr/sbin/sshd -D

One more reason the reboot is the simpler instruction that always works for a noob. :)

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required