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