SSH keys allow authentication between two hosts without the need of a password. SSH key authentication uses two keys a private key and a public key. To generate the keys, from a terminal prompt enter:
ssh-keygen -t dsa
This will generate the keys using a DSA authentication identity of the user. During the process you will be prompted for a password. Simply hit Enter when prompted to create the key. By default the public key is saved in the file ~/.ssh/id_dsa.p ub, while ~/.ssh/id_dsa is the private key. Now copy the id_dsa.pub file to the remote host and append it to ~/.ssh/authoriz ed_keys by entering:
ssh-copy-id username@remote host
Finally, double check the permissions on the authorized_keys file, only the authenticated user should have read and write permissions. If the permissions are not correct change them by:
chmod 600 .ssh/authorized _keys
You should now be able to SSH to the host without being prompted for a password.
ssh-keygen -t dsa
This will generate the keys using a DSA authentication identity of the user. During the process you will be prompted for a password. Simply hit Enter when prompted to create the key. By default the public key is saved in the file ~/.ssh/id_dsa.p
ssh-copy-id username@remote
Finally, double check the permissions on the authorized_keys file, only the authenticated user should have read and write permissions. If the permissions are not correct change them by:
chmod 600 .ssh/authorized
You should now be able to SSH to the host without being prompted for a password.
Link information under... https://help.ub untu.com/10.04/ serverguide/C/o penssh-server.h tml
The SSH Keys section
Comments