[rescue] openssh on netBSD

Jonathan Sadler rescue at sunhelp.org
Sat Oct 6 12:20:33 CDT 2001


> I share the same problem. SS5, netbsd, long long time until password
> prompt comes. If anyone known the magic demon tweak for this, I would
> like to know it, too!

Are you running sshd out of inetd?  Or as a standalone daemon?  If out
of inetd, then sshd will always generate new keys when it starts.
However, if you run as a standalone daemon, then sshd will generate it
once every <n> minutes, where n is set in the sshd.conf file using the
"KeyRegenerationInterval" directive.  If no directive exists in the
sshd.conf file, then the default interval of 3600 seconds (1 hour) is
used.

Running as a standalone daemon therefore doesn't have the "pause effect"
that running out of inetd has.  To set your system up this way, make the
following changes:

1. Edit /etc/defaults/rc.conf.  Look for the line which says:
     sshd=NO  ....
   Change it to say:
     sshd=YES .....

2. Edit /etc/inetd.conf.  Log for the line which says:
     ssh    stream tcp ...
   Comment it out so it looks as follows:
     #ssh   stream tcp ...

3. Send a SIGHUP to inetd by typing:
     kill -1 `cat /var/run/inetd.pid`

4. Start up sshd by typing:
     /etc/rc.d/sshd start

All done!

Jonathan Sadler





More information about the rescue mailing list