In this example, we are using 2 Linux instance.
One is the will be named Remote and the other Local
The Remote is the Linux machine you want to ssh to.
The Local is the Linux machine you are using to connect to the Remote.
On the Local
We need to create an ssh-key WITHOUT a password.
So when it will prompt to enter passphrase just hit ENTER.
Type in command :
ssh-keygen Enter passphrase: Enter same passphrase again:
Now we need to copy the public key to the Remote machine.
Let say the Remote machine IP is 192.168.1.10
ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.1.10
It will ask you to enter the password to ssh to the remote machine.
After to enter the password you should see a confirmation message that the public key has been copied to the Remote machine.
Now you can try to ssh to the Remote only using :
If it’s working you can SSH or RSYNC without password from now on.