SSH


SSH

The SSH - Secure Shell protocol is used to connect to remote hosts via the shell.

Authentication

SSH Key Pair

To authenticate via ssh, one method is to do this via public/private key authentication. This can be done on your computer.

To create a private/public key pair, the command ssh-keygen is used. This call can be parametrised to generate different types of ssh keys. When creating a key, you are asked to define a passphrase. This passphrase is used to unlock your public key later on. So please do not leave that empty.

ssh-keygen -t ed25519

If you have not set differently, your generated ssh key pair is saved in the ~/.ssh folder. You can see the public key with the call of the command:

cat ~/.ssh/id_ed25519.pub

Never share the private key. It shall not leave your machine.

See also: This external tutorial