Managing SSH Keys

SSH keys are the default way to log into instances.

You upload the public key to Verda.

You keep the private key on your computer.

If you haven’t connected yet, see Connecting to Your Server.

Create an SSH key

Run the following in your terminal:

ssh-keygen -t ed25519

By default, the key will be stored in $HOME/.ssh/id_ed25519. You can change the location if needed.

You will be prompted for a passphrase next.

circle-info

In general, it is a good idea to set a passphrase for your private key.

If you used the default key name, your public key is now in $HOME/.ssh/id_ed25519.pub.

To view your public key:

cat ~/.ssh/id_ed25519.pub

You can now add your public key to your project to be available when creating new instances.

Go to Keys -> SSH Keys -> Create and paste your key into the window that looks like this:

Next, deploy your server and your key will automatically be allowed on your instance.

Add or remove a key on an existing instance

1

Log into the instance

Keep this session open until you confirm the new key works.

2

Edit authorized_keys

Edit the file for the user you log in as:

  • root: /root/.ssh/authorized_keys

  • non-root user: ~/.ssh/authorized_keys

Each key must be on its own line.

3

Test before you log out

Open a second terminal and try connecting with the new key.

Only remove old keys once you’ve confirmed access.

chevron-rightIf SSH stops accepting the keyhashtag

Check permissions on the server:

Last updated

Was this helpful?