If you are using windows, open a CYGWIN shell, mac, then open your terminal.
# ssh-keygen
Follow all the prompts, and accept all the defaults.
This creates a file in your home directory: ~/.ssh/id_rsa.pub, copy this to the machine you want to automatically log into, put it in the file ~/.ssh/authorized_keys.