Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | magnus | 1 | #!/bin/sh -e |
2 | # |
||
3 | # Script to (re-)configure the lsh-server package. |
||
4 | # |
||
5 | # Copyright (C) 2000, 2001 Timshel Knoll <timshel@debian.org> |
||
6 | # |
||
7 | # This program is free software; you can redistribute it and/or modify |
||
8 | # it under the terms of the GNU General Public License as published by |
||
9 | # the Free Software Foundation; either version 2 of the License, or |
||
10 | # (at your option) any later version. |
||
11 | # |
||
12 | # This program is distributed in the hope that it will be useful, |
||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
15 | # GNU General Public License for more details. |
||
16 | # |
||
17 | # You should have received a copy of the GNU General Public License |
||
18 | # along with this program; if not, write to the Free Software |
||
19 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
||
20 | # |
||
21 | # On Debian systems, see /usr/share/common-licenses/GPL for the GNU GPL. |
||
22 | |||
23 | LSHD_DEFAULTS="/etc/default/lsh-server" |
||
24 | LSHD_PORT= |
||
25 | SSH1_FALLBACK= |
||
26 | |||
27 | HOST_KEY="/etc/lsh_host_key" |
||
28 | RANDOM_SEED="/var/spool/lsh/yarrow-seed-file" |
||
29 | |||
30 | if [ ! -f "$RANDOM_SEED" ] ; then |
||
31 | echo "Generating random seed $RANDOM_SEED" |
||
32 | lsh-make-seed --server --output-file "$RANDOM_SEED" |
||
33 | fi |
||
34 | |||
35 | # Generate a hostkey, if none already exist |
||
36 | # FIXME: should this convert an existing OpenSSH/SSH1 hostkey if one exists? |
||
37 | if [ ! -f "$HOST_KEY" ] ; then |
||
38 | printf "Generating a new host key: $HOST_KEY" |
||
39 | lsh-keygen --server --nist-level 8 | \ |
||
40 | lsh-writekey --server --output-file "$HOST_KEY" |
||
41 | echo " done." |
||
42 | fi |
||
43 | |||
44 | # Emacs stuff: |
||
45 | # Local-Variables: |
||
46 | # sh-indent: 3 |
||
47 | # End: |