patch to specify DSA host key on command line

G. S. Marzot gmarzot at nortelnetworks.com
Sat Dec 23 01:43:13 EST 2000


--- openssh-2.3.0p1/sshd.c      Sat Oct 14 01:23:13 2000
+++ openssh-2.3.0p1.new/sshd.c  Tue Dec 19 11:26:51 2000
@@ -506,7 +506,7 @@
        initialize_server_options(&options);
 
        /* Parse command-line arguments. */
-       while ((opt = getopt(ac, av, "f:p:b:k:h:g:V:u:diqQ46")) != EOF) {
+       while ((opt = getopt(ac, av, "f:p:b:k:h:H:g:V:u:diqQ46")) != EOF) {
                switch (opt) {
                case '4':
                        IPv4or6 = AF_INET;
@@ -557,6 +557,9 @@
                case 'h':
                        options.host_key_file = optarg;
                        break;
+               case 'H':
+                       options.host_dsa_key_file = optarg;
+                       break;
                case 'V':
                        client_version_string = optarg;
                        /* only makes sense with inetd_flag, i.e. no listen() */
@@ -578,8 +581,9 @@
                        fprintf(stderr, "  -k seconds Regenerate server key every this many seconds (default: 3600)\n");
                        fprintf(stderr, "  -g seconds Grace period for authentication (default: 300)\n");
                        fprintf(stderr, "  -b bits    Size of server RSA key (default: 768 bits)\n");
-                       fprintf(stderr, "  -h file    File from which to read host key (default: %s)\n",
-                           HOST_KEY_FILE);
+                       fprintf(stderr, "  -h file    File from which to read host key (default: %s)\n",HOST_KEY_FILE);
+                       fprintf(stderr, "  -H file    File from which to read DSA host key (default: %s)\n",HOST_DSA_KEY_FILE);
+
                        fprintf(stderr, "  -u len     Maximum hostname length for utmp recording\n");
                        fprintf(stderr, "  -4         Use IPv4 only\n");
                        fprintf(stderr, "  -6         Use IPv6 only\n");

-- 
G.S. Marzot                        email: gmarzot at nortelnetworks.com
Nortel Networks                    voice: (978)288-3990
600 Tech Park  M/S E65-60-405      
Billerica, MA  01821                 fax: (978)670-8145





More information about the openssh-unix-dev mailing list