Creating an SSH Key


To access a Njalla VPS you need to use SSH Key-Based authentication.
You can use an existing key or if needed generate a new one.

To generate a new key, open a terminal (Linux or OS X) or if you are using Windows, install Windows Subsystem for Linux and open a terminal with that.

For new keys we recommend ed25519 keys, but you can also continue using RSA keys.
To generate the key, enter the following command:


$ ssh-keygen -t ed25519

Press enter to all questions asked to use the default, note if you use a custom path, you tell ssh where your private key is.

Now that you have created the key, get the contents of ~/.ssh/id_ed25519.pub (or the path you provided).


$ cat ~/.ssh/id_ed25519.pub

copy and paste the full public key into the form while creating a new server. It has 3 parts and looks like this:


ssh-<algorithm> <key data> <comment>

to login to the server, you can now type:


ssh root@<IP of your server>

if you used a custom path for your ssh key, you can provide it by passing the -i command


ssh -i ~/Desktop/njalla-ed25519-key root@<IP of your server>

Make sure you backup the private part of your ssh key, without it you will not be able to login to your server.

Back to Documentation

FREE PROTECTION
Logout