Secure Shell (also called SSH) is a cryptographic organization convention which permits clients to safely play out various organization administrations over an unstable organization. SSH keys give a safer method of signing into a worker with SSH than utilizing a secret key(password) alone. While a password can ultimately be broken with a savage power assault, SSH keys are almost difficult to interpret by beast power alone.
Create the RSA Key Pair
The first step is to create the key pair on the client machine (Which is probably your local machine) – ssh-keygen -t rsa
Store the Keys and Passphrase
Once you have entered the Gen Key command, you will get a few more questions:
– Enter file in which to save the key (/home/vagrant/.ssh/id_rsa):
It’s up to you whether you want to use a passphrase. Keep pressing enter on key is generated.
Copying the Key
Once the key pair is generated, it’s time to place the public key on the server that we want to use.
You can copy the public key into the new machine’s authorized_keys file with the ssh-copy-id command. Make sure to replace the example username and IP address below.
– ssh-copy-id vagrant@linuxserver2