Check if there is already a public authentication key on local computer, this first step is important because if you override existing public authentication key, you will not be able to password-less login to previously set remote computers:
ls -la ~/.ssh/id_*.pub
If you already have public authentication key you can use it for password-less login but if there’s none, generate a new SSH key pair:
ssh-keygen -t rsa -b 4096 -C "your_email"
Go with the default file location and file name, press Enter for no passphrase and check it:
ls ~/.ssh/id_*
Next step is to copy your public authentication key to remote server:
ssh-copy-id remote_user_name@remote_server_ip_address
Enter the remote_user_name
password. Now check if its working:
ssh remote_user_name@remote_server_ip_address
If everything went well, this will log you into the remote server. You can add the same key to multiple remote serves.
Based on: linuxize.com