First generate your public key by running the following command
ssh-keygen -t rsa
I accepted the defaults by pressing enter. After doing this, you should have a id_rsa and id_rsa.pub file in ~/.ssh/
Now use the ssh-copy-id utility to set up the remote server by running the following command
ssh-copy-id -i .ssh/id_rsa.pub email@example.com
You will be prompted for your password one last time.
Once that's done you can simply type
to connect to your server.