SSH without password to/from Ubuntu 22.04
Allow ssh-rsa key type on Ubuntu 22.04 with or without password protection.
Lets start off by saying SSH without passwords isn't a good idea. That said, within my own lab environment I do tend to use keys without passwords for ease of use.
However, following a recent upgrade trying to SSH into or from my Ubuntu 22.04 server I am no longer able to ssh between hosts using a ssh-rsa public key without a password.
The password element is a bit of a red herring here, the reason this isn't working is simply down to Ubuntu no longer supports the ssh-rsa public key type by default.
Again, this isn't best practice, but it can be simply enabled again. I created the file /etc/ssh/sshd_config.d/rsa-key.conf with the following text.
# Be sure to understand the security implications before enabling this.
# Enable ssh-rsa public key support
PubkeyAcceptedKeyTypes +ssh-rsa
After that it was a simple case of restarting sshd.
sudo systemctl restart ssd
Following which I could use my rsa public key authentication again to ssh into my Ubuntu server. If you wish to also enable it for outgoing connection, the file would be placed in the /etc/ssh/ssh_config.d/ directory.