[Home]SSH

Hudsonic | RecentChanges | Preferences | Hudsonic.com

Good info at http://www.deadman.org/ssh-tut.html --only thing it is missing is a troubleshooting tip: try ssh -v remote.host to see problems.

Hint: check the fileperms on your dirs. Home should be 700 or 755, ~/.ssh should be 700, ~/.ssh/* should be 600.

The classic sshd PITA scenario solved:

 $ sudo /usr/sbin/sshd
 Could not load host key: /etc/ssh/ssh_host_key
 Could not load host key: /etc/ssh/ssh_host_rsa_key
 Could not load host key: /etc/ssh/ssh_host_dsa_key
 Disabling protocol version 1. Could not load host key
 Disabling protocol version 2. Could not load host key
 sshd: no hostkeys available -- exiting.

Solutions:

  1. The easy way: start sshd like this instead: $ sudo /etc/init.d/sshd restart
    1. (um, well, may have to do other prep work, like mkdir /etc/ssh ...
    2. ... or hacking your sshd rc script to generate the host keys in another dir ... ymmv)
  2. The hard way:
    1. sudo ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N
    2. sudo ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N
    3. sudo ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N

Hudsonic | RecentChanges | Preferences | Hudsonic.com
This page is read-only | View other revisions
Last edited January 14, 2005 5:34 pm PST by Markh (diff)
Search: