Cannot connect to ubuntu 22.04

key type ssh-rsa not in PubkeyAcceptedAlgorithms

If you are encountering the error "key type ssh-rsa not in PubkeyAcceptedAlgorithms" while attempting to connect to an SSH server with public key authentication, there is no need to worry. This error usually occurs when you are connecting to a server with a newer operating system such as Ubuntu 22. The reason for this error is that the SHA RSA 1 algorithm used for key generation by DeployBot is no longer supported in newer Linux systems.

Fortunately, you can easily resolve this issue by adding the following line to  /etc/ssh/sshd_config:

PubkeyAcceptedAlgorithms +ssh-rsa

After adding this line, you will need to restart the SSH service. Once you have done this, any SSH connections with that key type will be accepted.

However, we recommend that you consider updating the SSH key on your project to a newer type for better security. DeployBot now allows the generation of ED25519 keys by default, which is a more modern and widely accepted algorithm in newer operating systems. For existing projects that have been created previously, you can contact support to update them with the newer algorithm (will be released soon).

We hope this information helps you resolve the issue and secure your SSH connections. If you have any further questions or concerns, please do not hesitate to reach out to us.

Still need help? Contact Us Contact Us