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/ >> ~/.ssh/authorized_keys

    This will create a key

2. Copy the to remote machine. Execute the following command to send the key to remote server.

    $ scp ~/.ssh/ remote-machine:~/.ssh/

3. Login to the remote machine and execute the following command to authorize the key.

    $ cat ~/.ssh/ >> ~/.ssh/authorized_keys


Anonymous said...

ssh remote-machine <> ~/.ssh/authorized_keys

Abhishek said...

we also need to set permission on .ssh folder and the authorized_keys file ,also need to chown the .ssh and authorized_keys .