

Step 6 – Set up SSH Agent to store the keys to avoid having to re-enter the passphrase at every login (Optional) Ssh -i /path/to/private/key a result, we are now able to SSH into our machine using our PRIVATE KEY! Note that if you’re not using the default path and file names, you’ll need to use the -i flag to specify the private key file: If you’ve previously specified a passphrase, you’ll be prompted to do so again: Step 5 – With that, we can now just SSH into our server using the following command: USER is the username we want to login as onto the server.This can be done manually by connecting to the server and manually configuring everything, but there is a utility called ssh-copy-id that takes care of everything for us!Īs a result, simply run to configure our Server to use our new ssh keys. Step 4 – The next step is to set up our Server so that we can log in with our private key.


PERMISSIONS SHOULD ALWAYS BE 600 IN SSH Private Key Files! If not, use the chmod command to set its permission to the specified value: Take note of the private key’s permissions ( id_rsa ).
