Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Blame | Last modification | View Log | RSS feed

#!/bin/sh -e
#
# Script to (re-)configure the lsh-server package.
#
# Copyright (C) 2000, 2001 Timshel Knoll <timshel@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# On Debian systems, see /usr/share/common-licenses/GPL for the GNU GPL.

LSHD_DEFAULTS="/etc/default/lsh-server"
LSHD_PORT=
SSH1_FALLBACK=

HOST_KEY="/etc/lsh_host_key"
RANDOM_SEED="/var/spool/lsh/yarrow-seed-file"

if [ ! -f "$RANDOM_SEED" ] ; then
   echo "Generating random seed $RANDOM_SEED"
   lsh-make-seed --server --output-file "$RANDOM_SEED"
fi

# Generate a hostkey, if none already exist
# FIXME: should this convert an existing OpenSSH/SSH1 hostkey if one exists?
if [ ! -f "$HOST_KEY" ] ; then
   printf "Generating a new host key: $HOST_KEY"
   lsh-keygen --server --nist-level 8 | \
      lsh-writekey --server --output-file "$HOST_KEY"
   echo " done."
fi

# Emacs stuff:
# Local-Variables:
# sh-indent: 3
# End: