diff options
author | Jakob Schlyter <jakob@cvs.openbsd.org> | 2001-08-03 10:31:31 +0000 |
---|---|---|
committer | Jakob Schlyter <jakob@cvs.openbsd.org> | 2001-08-03 10:31:31 +0000 |
commit | 6712a467af862e2728aa26f976d9859a2466f183 (patch) | |
tree | e3bfe9238864dd3538f8e7eb10290134c688bece /usr.bin/ssh | |
parent | 43479b623284b4c3007c97ddafc3f76e3b5e6844 (diff) |
improve usage(). ok markus@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/ssh-add.c | 21 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-agent.c | 12 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-keyscan.c | 10 |
3 files changed, 29 insertions, 14 deletions
diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c index fa9a5122ecf..7131efd6249 100644 --- a/usr.bin/ssh/ssh-add.c +++ b/usr.bin/ssh/ssh-add.c @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-add.c,v 1.44 2001/08/01 22:03:33 markus Exp $"); +RCSID("$OpenBSD: ssh-add.c,v 1.45 2001/08/03 10:31:30 jakob Exp $"); #include <openssl/evp.h> @@ -49,6 +49,9 @@ RCSID("$OpenBSD: ssh-add.c,v 1.44 2001/08/01 22:03:33 markus Exp $"); #include "pathnames.h" #include "readpass.h" +/* argv0 */ +extern char *__progname; + /* we keep a cache of one passphrases */ static char *pass = NULL; static void @@ -189,12 +192,16 @@ list_identities(AuthenticationConnection *ac, int do_fp) static void usage(void) { - printf("Usage: ssh-add [options]\n"); - printf(" -l, -L : list identities\n"); - printf(" -d : delete identity\n"); - printf(" -D : delete all identities\n"); - printf(" -s reader_num : add key in the smartcard in reader_num.\n"); - printf(" -e reader_num : remove key in the smartcard in reader_num.\n"); + fprintf(stderr, "Usage: %s [options]\n", __progname); + fprintf(stderr, "Options:\n"); + fprintf(stderr, " -l List fingerprints of all identities.\n"); + fprintf(stderr, " -L List public key parameters of all identities.\n"); + fprintf(stderr, " -d Delete identity.\n"); + fprintf(stderr, " -D Delete all identities.\n"); +#ifdef SMARTCARD + fprintf(stderr, " -s reader Add key in smartcard reader.\n"); + fprintf(stderr, " -e reader Remove key in smartcard reader.\n"); +#endif } int diff --git a/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c index 78c901948cc..be91e7c4b97 100644 --- a/usr.bin/ssh/ssh-agent.c +++ b/usr.bin/ssh/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.71 2001/08/02 16:14:05 jakob Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.72 2001/08/03 10:31:30 jakob Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -36,7 +36,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-agent.c,v 1.71 2001/08/02 16:14:05 jakob Exp $"); +RCSID("$OpenBSD: ssh-agent.c,v 1.72 2001/08/03 10:31:30 jakob Exp $"); #include <openssl/evp.h> #include <openssl/md5.h> @@ -817,9 +817,13 @@ check_parent_exists(int sig) static void usage(void) { - fprintf(stderr, "ssh-agent version %s\n", SSH_VERSION); - fprintf(stderr, "Usage: %s [-c | -s] [-k] [-d] [command [args...]]\n", + fprintf(stderr, "Usage: %s [options] [command [args ...]]\n", __progname); + fprintf(stderr, "Options:\n"); + fprintf(stderr, " -c Generate C-shell commands on stdout.\n"); + fprintf(stderr, " -s Generate Bourne shell commands on stdout.\n"); + fprintf(stderr, " -k Kill the current agent.\n"); + fprintf(stderr, " -d Debug mode.\n"); exit(1); } diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c index 18e3b024d40..ab58b0db97a 100644 --- a/usr.bin/ssh/ssh-keyscan.c +++ b/usr.bin/ssh/ssh-keyscan.c @@ -7,7 +7,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.24 2001/06/23 15:12:20 itojun Exp $"); +RCSID("$OpenBSD: ssh-keyscan.c,v 1.25 2001/08/03 10:31:30 jakob Exp $"); #include <sys/queue.h> #include <errno.h> @@ -562,8 +562,12 @@ nexthost(int argc, char **argv) static void usage(void) { - fatal("usage: %s [-t timeout] { [--] host | -f file } ...", __progname); - return; + fprintf(stderr, "Usage: %s [options] [ host | addrlist namelist ]\n", + __progname); + fprintf(stderr, "Options:\n"); + fprintf(stderr, " -t timeout Set connection timeout.\n"); + fprintf(stderr, " -f file Read hosts or addresses from file.\n"); + exit(1); } int |