Wednesday, January 12, 2011

Configuring passwordless ssh access

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
Post a Comment