Log in Page Discussion History Go to the site toolbox

Ssh password-less access to Haydn

From WikIRI

Contents

This is useful ...

... if you have to repetitively login to a remote machine via ssh for instance to access a cvs repository.


This is dangerous...

... after applying this procedure the remote machine is as secure as the local machine.

The procedure

Assuming you want to login from UserLocal in a LOCAL machine to UserRemote in a REMOTE computer (for instance the LOCAL machine can be your desktop computer, the REMOTE one haydn, and the users your local and haydn user names, respectively)

  • Check if you have a public-private pair of keys (i.e. the files id_dsa and id_dsa.pub in the .ssh directory in your home folder in the LOCAL machine). If your have them, you can skip next step.
  • Generate the public and private ssh-keys in the local machine. When asked for a keyphrase just type enter.
  * ssh-keygen -t dsa
  • Copy the public they to the remote machine
  * scp .ssh/id_dsa.pub UserRemote@REMOTE:.
  • Login to the remote machine using your password for the last time
  * ssh UserRemote@REMOTE
  • Add the public key to the list of authorized servers
  * cat id_dsa.pub >> .ssh/authorized_keys
  • If you have problems, is because the .ssh/authorized_keys file doesn't exist. Use instead
  * cat id_dsa.pub > .ssh/authorized_keys
  • Remove the public key in the local machine
  * rm id_dsa.pub
  • Log out from the remote server

Additional info

Easy copy id_dsa.pub

# ssh-copy-id -i .ssh/id_dsa.pub test@host

Site Toolbox:

This page was last modified on 4 September 2009, at 08:30. - This page has been accessed 1,163 times. - Disclaimers - About WikIRI