summaryrefslogtreecommitdiffstats
path: root/contrib/caldera/ssh-host-keygen
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2001-04-26 22:50:48 -0700
committerTim Rice <tim@multitalents.net>2001-04-26 22:50:48 -0700
commita8c7a62ad4a2401e1200cef2c180d34f95aaf7cc (patch)
tree2a51426e350054fb1bc66d9289312101b90e9c2c /contrib/caldera/ssh-host-keygen
parentbb34625b6c417d40571acc166786ba0addf728de (diff)
- (tim) update contrib/caldera files with what Caldera is using.
<sps@caldera.de>
Diffstat (limited to 'contrib/caldera/ssh-host-keygen')
-rwxr-xr-xcontrib/caldera/ssh-host-keygen36
1 files changed, 36 insertions, 0 deletions
diff --git a/contrib/caldera/ssh-host-keygen b/contrib/caldera/ssh-host-keygen
new file mode 100755
index 00000000..28a97b9b
--- /dev/null
+++ b/contrib/caldera/ssh-host-keygen
@@ -0,0 +1,36 @@
+#! /bin/sh
+#
+# $Id: ssh-host-keygen,v 1.1 2001/04/27 05:50:50 tim Exp $
+#
+# This script is normally run only *once* for a given host
+# (in a given period of time) -- on updates/upgrades/recovery
+# the ssh_host_key* files _should_ be retained! Otherwise false
+# "man-in-the-middle-attack" alerts will frighten unsuspecting
+# clients...
+
+keydir=@sysconfdir@
+keygen=@sshkeygen@
+
+if [ -f $keydir/ssh_host_key -o \
+ -f $keydir/ssh_host_key.pub ]; then
+ echo "You already have an SSH1 RSA host key in $keydir/ssh_host_key."
+else
+ echo "Generating 1024 bit SSH1 RSA host key."
+ $keygen -b 1024 -t rsa1 -f $keydir/ssh_host_key -C '' -N ''
+fi
+
+if [ -f $keydir/ssh_host_rsa_key -o \
+ -f $keydir/ssh_host_rsa_key.pub ]; then
+ echo "You already have an SSH2 RSA host key in $keydir/ssh_host_rsa_key."
+else
+ echo "Generating 1024 bit SSH2 RSA host key."
+ $keygen -b 1024 -t rsa -f $keydir/ssh_host_rsa_key -C '' -N ''
+fi
+
+if [ -f $keydir/ssh_host_dsa_key -o \
+ -f $keydir/ssh_host_dsa_key.pub ]; then
+ echo "You already have an SSH2 DSA host key in $keydir/ssh_host_dsa_key."
+else
+ echo "Generating SSH2 DSA host key."
+ $keygen -t dsa -f $keydir/ssh_host_dsa_key -C '' -N ''
+fi