This is fairly straight-forward to do - there's a simple walkthrough to be found here.
The main points are:
- Run
ssh-keygenon your machine. This will generate public and private keys for you. - Copy and paste the contents of your public key (likely in
~/.ssh/id_rsa.pub) in to~/.ssh/authorized_keyson the remote machine.
It's important to remember that this will give anyone who has access to the private key on your machine the same access to the remote machine, so when generating the key pair you may choose to enter a password here for extra security.