Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc/rc.d auto-generate SSH protocol version 2 RSA key.
details: https://anonhg.NetBSD.org/src/rev/4fa91d7be543
branches: trunk
changeset: 507611:4fa91d7be543
user: itojun <itojun%NetBSD.org@localhost>
date: Mon Mar 26 22:21:26 2001 +0000
description:
auto-generate SSH protocol version 2 RSA key.
use newer command line syntax for ssh-keygen (-t <type>, instead of -d)
diffstat:
etc/rc.d/sshd | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r c33358b23e9b -r 4fa91d7be543 etc/rc.d/sshd
--- a/etc/rc.d/sshd Mon Mar 26 21:58:34 2001 +0000
+++ b/etc/rc.d/sshd Mon Mar 26 22:21:26 2001 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: sshd,v 1.8 2000/09/19 13:04:39 lukem Exp $
+# $NetBSD: sshd,v 1.9 2001/03/26 22:21:26 itojun Exp $
#
# PROVIDE: sshd
@@ -19,18 +19,26 @@
{
if [ -f /etc/ssh_host_key ]; then
echo "You already have an RSA host key in /etc/ssh_host_key"
- echo "Skipping RSA Key Generation"
+ echo "Skipping protocol version 1 RSA Key Generation"
else
umask 022
- /usr/bin/ssh-keygen -b 1024 -f /etc/ssh_host_key -N ''
+ /usr/bin/ssh-keygen -t rsa1 -b 1024 -f /etc/ssh_host_key -N ''
fi
if [ -f /etc/ssh_host_dsa_key ]; then
echo "You already have a DSA host key in /etc/ssh_host_dsa_key"
- echo "Skipping DSA Key Generation"
+ echo "Skipping protocol version 2 DSA Key Generation"
else
umask 022
- /usr/bin/ssh-keygen -d -f /etc/ssh_host_dsa_key -N ''
+ /usr/bin/ssh-keygen -t dsa -f /etc/ssh_host_dsa_key -N ''
+ fi
+
+ if [ -f /etc/ssh_host_rsa_key ]; then
+ echo "You already have a RSA host key in /etc/ssh_host_rsa_key"
+ echo "Skipping protocol version 2 RSA Key Generation"
+ else
+ umask 022
+ /usr/bin/ssh-keygen -t rsa -f /etc/ssh_host_rsa_key -N ''
fi
}
Home |
Main Index |
Thread Index |
Old Index