SSH Without A Password
Here's a quick post explaining how you can SSH into a remote machine without using a password.
Spoiler: Yes, it is of course using a public key.
First generate a pair of authentication keys on your laptop.
ssh-keygen -t rsa
Then copy the public key generated in the previous step, located at .ssh/id_rsa.pub
, to /home/ubuntu/.ssh/authorized_keys
of your remote machine.
Once done, you can log into the remote machine directly without a password.
ssh <user>@<remote-machine-address>
In case of ubuntu
user, you'd use:
ssh ubuntu@<remote-machine-address>