SSH Login Without Password
Besides convenience and saving time to enter a password every time you ssh into a remote machine, setting up a passwordless ssh login also allows you to write scripts that requires remote access into a machine to perform some tasks.
First, create a public / private key pair on your local machine.
Second, check that a .ssh directory in the home directory of the remote user is present, if not, create it.
Third, copy the public key of the local machine over to the .ssh directory in the remote machine. The command redirect the output in the local machine and concatenate it to a file named “authorized_keys” in the remote machine if it previously exists. If there is no such file, this file will be created with the output.
Once done, restart your sshd service.
Now, you can try ssh into the remote machine using the remote user again, this time without password :)
Note: You may need to wait for awhile before trying this.
If you like my notes, especially if it saves you some time pulling your hair out, feel free to give me a clap or even buy me a donut ;)