diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2005-10-31 11:12:50 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2005-10-31 11:12:50 +0000 |
commit | 9b2929588a4fd93855c17da3bf1ec6e8eac28ecc (patch) | |
tree | 78046c47150454f4abdd09a9c2bc355f77c4d55c | |
parent | 60d5566b7eb61ee360724a5a3e12d9924b4f3d84 (diff) |
generate a protocol 2 RSA key by default
-rw-r--r-- | usr.bin/ssh/ssh-keygen.1 | 5 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-keygen.c | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/ssh/ssh-keygen.1 b/usr.bin/ssh/ssh-keygen.1 index 5454d00ce88..2c952ba71ef 100644 --- a/usr.bin/ssh/ssh-keygen.1 +++ b/usr.bin/ssh/ssh-keygen.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ssh-keygen.1,v 1.69 2005/06/08 03:50:00 djm Exp $ +.\" $OpenBSD: ssh-keygen.1,v 1.70 2005/10/31 11:12:49 djm Exp $ .\" .\" -*- nroff -*- .\" @@ -118,6 +118,9 @@ keys for use by SSH protocol version 2. The type of key to be generated is specified with the .Fl t option. +If invoked without any arguments, +.Nm +will generate a RSA key for use in SSH protocol 2 connections. .Pp .Nm is also used to generate groups for use in Diffie-Hellman group diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index 9f4d66e036d..a830f54ce11 100644 --- a/usr.bin/ssh/ssh-keygen.c +++ b/usr.bin/ssh/ssh-keygen.c @@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keygen.c,v 1.132 2005/10/30 08:52:18 djm Exp $"); +RCSID("$OpenBSD: ssh-keygen.c,v 1.133 2005/10/31 11:12:49 djm Exp $"); #include <openssl/evp.h> #include <openssl/pem.h> @@ -1246,10 +1246,9 @@ main(int ac, char **av) arc4random_stir(); - if (key_type_name == NULL) { - printf("You must specify a key type (-t).\n"); - usage(); - } + if (key_type_name == NULL) + key_type_name = "rsa"; + type = key_type_from_name(key_type_name); if (type == KEY_UNSPEC) { fprintf(stderr, "unknown key type %s\n", key_type_name); |