How to create an SSH key? Print

  • 0

It's always recommended to use an SSH key for the login process. In this article we create an ED25519 SSH key as it is the most compatible SSH key.

To generate the key you run the following command

ssh-keygen -t ed25519

This command creates two files, one pub key and one private key. You always share your pub key with the server and NEVER your private key! 

Important is the content of your public key file.

cat ~/.ssh/id_ed25519.pub

To add the key to your server select and copy the contents of the id_ed25519.pub file and paste it in the authorzied_keys file on your server which you can find in the homedirectory from your server user ~/.ssh/authorized_keys.






Was this answer helpful?

« Back