[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20020124: setting up sshd on Linux



>From: Gilbert Sebenste <address@hidden>
>Organization: NIU
>Keywords: 200201242327.g0ONRjx26066 ssh Linux

Gilbert,

re: installing ssh

>Yep, because version 2.9p2-12 is out. I just installed it. Now what do I 
>do to get it to work. Any clue? I've never used it.

I just got the straight poop from my system administrator.  When you installed
ssh, it was setup to start at various run levels.  Which can be checked
with chkconfig:

chkconfig --list | grep ssh
sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off

Seeing as how 'mcidas' is logged on and is running a session (more on
this in a separate email), I did not want to take the machine down to a
different run level (best done on reboot) and then backup.  So, I tried
(as root) running /usr/sbin/sshd:

[root@weather2 ssh]# /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.

This is saying that various keys needed by sshd were not available.
Usually thee is a configuration script that one runs to setup ssh and
create these keys, but I wanted to get things working.  So, Mike supplied
me with the invocations that were needed:

ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""

These create the needed key files in /etc/ssh.  Take a look...

After creating the keys, I was able to start sshd by hand:

[root@weather2 ssh]# /usr/sbin/sshd

And, once sshd was running, I was able to ssh to weather2 from my
machine here at Unidata.

So, until you either change run levels or reboot, sshd will be running
from my "by hand" invocation.  After you change run levels or reboot,
it should be started automatically for you.

Tom

>From address@hidden Thu Jan 24 21:10:00 2002
>Subject: Re: 20020124: setting up sshd on Linux

>Great!
 
re: after you change run levels or reboot ssh will be started automatically

>I had a boatload of patches put on from Redhat. So, I had to reboot!
>It works now. Thanks! I'll save this message...although my other 
>machines have the regular version of ssh on them. More to come.