Password less ssh login

  • On the client, generate a new ssh key
    using "ssh-keygen" command . It will ask you for a path to
    save the file, and a passphrase, just press "enter" to
    select alldefault values and to return to console.

    ssh-keygen -t dsa

  • Next copy the file "/home/<user's-home-directory>/.ssh/" to the server running "sshd" service using scp or a suitable method. The command mentioned below is for scp.

    scp /home/<user's-home-directory>/.ssh/ <user>@<server-system>/home/<user's-home-directory>/

  • To allow multiple system to connect to the server running sshd, add the content of the "" file from another system using the following format

    cat >> /home/<user's-home-directory>/.ssh/authorized_keys

  • After setting up the "authorized_keys" file, run the following command to setup the permission correctly

    chmod 0700 /home/<user's-home-directotry>/.ssh -R

And you done :)


Post a Comment

Popular posts from this blog

phpipam behind a load balancer which handles ssl offloading

recovering LUKS encrypted Ubuntu LV Group when mounting on a different Ubuntu system