Is it possible to use more than one SSH key?

It’s possible to allow more than one SSH key to access your instance. To do so, you need to add public keys to ~/.ssh/authorized_keys. You can do this with the echo command.

SSH into your instance as you normally do and run:

echo 'PUBLIC-KEY' >> ~/.ssh/authorized_keys

Replace PUBLIC-KEY with the public key you want to add to your instance. Make sure to keep the single quotes (' ').

You should now be able to log into your instance using the SSH key you just added.


Last modified February 11, 2023: Use more popular name (8ae4ab5)