Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/etc/rc.d Pull up revision 1.9 (requested by itojun):



details:   https://anonhg.NetBSD.org/src/rev/b93eeb8156e6
branches:  netbsd-1-5
changeset: 491027:b93eeb8156e6
user:      he <he%NetBSD.org@localhost>
date:      Fri Mar 30 22:36:34 2001 +0000

description:
Pull up revision 1.9 (requested by itojun):
  Auto-generate SSH protocol version 2 RSA key.
  Use newer command syntax (``-t <type>'' instead of ``-d'').

diffstat:

 etc/rc.d/sshd |  18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diffs (42 lines):

diff -r b07e41ed5286 -r b93eeb8156e6 etc/rc.d/sshd
--- a/etc/rc.d/sshd     Fri Mar 30 22:33:42 2001 +0000
+++ b/etc/rc.d/sshd     Fri Mar 30 22:36:34 2001 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: sshd,v 1.5.2.4 2000/10/02 01:10:34 lukem Exp $
+# $NetBSD: sshd,v 1.5.2.5 2001/03/30 22:36:34 he 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