l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2009 Dec 24 20:36

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] ssh host key generation in init script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] ssh host key generation in init script

>>>>> On Wed, 23 Dec 2009 17:53:59 -0800, Nick Schmalenberger <nick@schmalenberger.us> said:

NS> when ls is true. I also tried
NS> test -f /etc/ssh/ssh_host_* || /usr/sbin/dpkg-reconfigure

  file=`grep 'HostKey' /etc/ssh/sshd_config | awk '{print $NF}`
  test -f $file

But the problem is that in fedora, for example, the HostKey line is
commented out because it uses the default of /etc/ssh/ssh_host_key.  The
question is, do distributions change that via a patch or always use the
sshd_config file for changing the location?  If the later, the above is
safe though you'd want to remove comments and make it:

  file=`egrep '^ *HostKey' /etc/ssh/sshd_config | awk '{print $NF}`
  if test "x$file" = "x" ; then

  ... test -f $file

Wes Hardaker                                     
My Pictures:  http://capturedonearth.com/
My Thoughts:  http://pontifications.hardakers.net/
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.