- On the local host, go to the following directory /root/.ssh/
- Run the following command in order to generate a file that contains the key you will need: ssh-keygen -t ds
- When prompted for what file to save the key, you can just leave the default which is what we will use, /root/.ssh/id_dsa
- When prompted for a passphrase, you can just leave blank.
- Now go into the new file generated id_dsa.pub and copy the contents.
- Log into the remote host.
- Go to the directory /root/.ssh/.
- Edit or create the file authorized_keys. You will paste the contents from id_dsa.pub that you copied from the local machine in there.
That is all there is to it. When you ssh from the local machine to the remote machine now, it will go straight into it without prompting you for a password.
No comments:
Post a Comment