I often forget the exact command to run or which server to run it on, so I’ve outlined the process here for a simple SSH key exchange.
On the server which will be initiating the SSH connection, run:
ssh-keygen -t dsa
and continuously press return to all questions until you return to the command prompt. This creates a file ~/.ssh/id_dsa.pub which we need to move over to the server which will be receiving the ssh connection.
ssh-copy-id user@SERVER
Type yes if prompted to accept the ssh key sign. That is it – now just ssh SERVERNAME
to get in without prompt.