>>>>> On Wed, 23 Dec 2009 17:53:59 -0800, Nick Schmalenberger >>>>> <n...@schmalenberger.us> said:
NS> when ls is true. I also tried NS> test -f /etc/ssh/ssh_host_* || /usr/sbin/dpkg-reconfigure Maybe 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 file=/etc/ssh/ssh_host_key fi ... test -f $file -- Wes Hardaker My Pictures: http://capturedonearth.com/ My Thoughts: http://pontifications.hardakers.net/ _______________________________________________ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech