April
29th 2008
Automate login from ssh2 client to openssh host

Posted under Uncategorized

To automate the login from a client with ssh2 to a host running openssh, do the following:

  • On ssh2 client: ssh-keygen -t rsa -b 1024, use an empty password (just hit enter)
  • Copy the file ~/.ssh2/id_rsa_1024_a.pub to the host
  • On ssh2 client, add file ~/.ssh2/identification, with the following single line in it:
    IdKey id_rsa_1024_a
  • On the host, do: ssh-keygen -i -f id_rsa_1024_a.pub >> ~/.ssh/authorized_keys
  • On the host, open ~/.ssh/authorized_keys with your favorite editor and append user@hostname to the last line (replace user with the username from the client and hostname with the hostname of the client :)
  • That’s it :)

No Comments »

Trackback URI | Comments RSS

Leave a Reply