How to setup passwordless ssh
-
Check whether you have a public RSA key to share on your local computer. This means that you should have a file named
~/.ssh/id_rsa.pub. If so, skip next step. -
If you don't have a public RSA key, generate one using the following command accepting all default suggestions by pressing
Enter: -
Create a profile for the remote computer on your local computer by adding the following to your
~/.ssh/configfile. Create this file if it does not exist. Note that you need to know the IP address of the remote machine you are logging onto (Can be gotten by typinghostname -Ion the remote machine). Replace the machine name (anything you want), username and IP address below as appropriate. -
Create a
~/.sshdirectory on the remote computer if it does not exist already (You can log on once with password a check if this directory exists). If this directory exists, skip this step. ReplaceREMOTEbelow with the name of the computer you are logging onto (that one you gave in theHOSTfield above). -
Send your public RSA key to the remote computer. Replace
REMOTEbelow with the name of the computer you are logging onto (that one you gave in theHOSTfield above). -
Now you should be able to do
ssh REMOTEand login without a password.