With SSH you can create trust relationships between machines to connect between them without asking for password to be able to install Veritas software or just to connect quickly to remote systems.
First, you must create the Secret and Public key with this command:
# ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P ”
You can choose dsa or rsa as type of ssh protocol version (should use the same as on sshd_config file).
- rsa is used with protocol 1 in ssh.
- dsa is used with protocol 2 in ssh.
It will request you for a shared pass phrase to decrypt the public key every time, so, just add -P ” (single quote, two times) to specify you don’t want pass phrase, or just press enter when requested for password
You will have two files, id_dsa which is your private key, you should backup outside of your machine and id_dsa.pub which is the public key to share everywhere.
Now, add the $HOME/.ssh/id_dsa.pub to the $HOME/.ssh/authorized_keys on the remote machine.
# scp $HOME/.ssh/id_dsa.pub servername:/path/to/home/.ssh/authorized_keys
(Be careful this will overwrite your authorized_keys, if you want to add to this file, copy it first to /tmp on remote server and later run ‘cat /tmp/file >> $HOME/.ssh/authorized_keys’ on your remote machine)
Now, try ssh to the remote machine and… voila!.
Now troubleshooting, normally if these steps fail, or you did something wrong ;-) or just check the permissions of the .ssh folder in you home folder, those might be 700 for the folder itself and 600 for the files inside.