How it works...
A key-pair is made up of two files: a private key file that a user keeps and a public key that is stored on the remote server. On using the SSH protocol, the user tries to establish the connection between server and client with the exchange key information to determine if the user is allowed to log on.
Let's take a look at the way we can generate a key-pair using a tool called SSH-keygen. It offers a lot of different options for changing the encryption algorithm, but in this case, the default values are used to generate a key-pair.
First, I'm asked where I want to save the key. The tool suggests the hidden .ssh folder in my home folder, under the name id_RSA. This is the default, but you can set any name you like. The SSH ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access