Generate a DSA Key Pair
$ ssh-keygen -t dsa
The output should look like like this:
Enter file in which to save the key (/home/my_computer/.ssh/id_dsa): Press [Enter] key
Enter passphrase (empty for no passphrase): myPassword
Enter same passphrase again: myPassword
Your identification has been saved in /home/my_computer/.ssh/id_dsa.
Your public key has been saved in /home/my_computer/.ssh/id_dsa.pub.
The key fingerprint is:
Next we have to set the permissions for the directory
CD to the .ssh directory and modify the permissions.
$ cd ~/.ssh && chmod 755 .ssh
Now we copy the public key.
$ scp ~/.ssh/my_computer/id_dsa.pub user@my_server:.ssh/authorized_keys
After that finishes we can remote in to the remote server and set the correct permissions for the key.
$ chmod 600 ~/.ssh/authorized_keys
- Finally on your local machine…
exec /usr/bin/ssh-agent $SHELL and then
Enjoy logging in without interuption.