1. Execute the following commands on local machine.
$ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
This will create a key id_dsa.pub
2. Copy the id_dsa.pub to remote machine. Execute the following command to send the key to remote server.
$ scp ~/.ssh/id_dsa.pub remote-machine:~/.ssh/
3. Login to the remote machine and execute the following command to authorize the key.
$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
Subscribe to:
Post Comments
(
Atom
)
2 comments :
ssh remote-machine <> ~/.ssh/authorized_keys
EOF
we also need to set permission on .ssh folder and the authorized_keys file ,also need to chown the .ssh and authorized_keys .
Post a Comment