diff options
author | 1999-12-02 20:05:40 +0000 | |
---|---|---|
committer | 1999-12-02 20:05:40 +0000 | |
commit | 2745bd98d4e2c449c8bacc7c8bfcbc8bf7e829e6 (patch) | |
tree | f521e05e895fb49f14c125d7fd648cd12c909a74 | |
parent | Opps. Back out a part of last commit that wasn't intended for commit yet. (diff) | |
download | wireguard-openbsd-2745bd98d4e2c449c8bacc7c8bfcbc8bf7e829e6.tar.xz wireguard-openbsd-2745bd98d4e2c449c8bacc7c8bfcbc8bf7e829e6.zip |
document $SSH_ASKPASS, reasonable default
-rw-r--r-- | usr.bin/ssh/ssh-add.1 | 7 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-add.c | 10 | ||||
-rw-r--r-- | usr.bin/ssh/ssh.h | 9 |
3 files changed, 20 insertions, 6 deletions
diff --git a/usr.bin/ssh/ssh-add.1 b/usr.bin/ssh/ssh-add.1 index 5aef92cff7e..7aca43715ff 100644 --- a/usr.bin/ssh/ssh-add.1 +++ b/usr.bin/ssh/ssh-add.1 @@ -9,7 +9,7 @@ .\" .\" Created: Sat Apr 22 23:55:14 1995 ylo .\" -.\" $Id: ssh-add.1,v 1.8 1999/11/24 16:13:45 markus Exp $ +.\" $Id: ssh-add.1,v 1.9 1999/12/02 20:05:40 markus Exp $ .\" .Dd September 25, 1999 .Dt SSH-ADD 1 @@ -51,7 +51,7 @@ Deletes all identities from the agent. .El .Sh FILES .Bl -tag -width Ds -.Pa $HOME/.ssh/identity +.It Pa $HOME/.ssh/identity Contains the RSA authentication identity of the user. This file should not be readable by anyone but the user. Note that @@ -64,6 +64,9 @@ default file added by .Nm when no other files have been specified. .Pp +.Sh ENVIRONMENT +.Bl -tag -width Ds +.It Ev "DISPLAY" and "SSH_ASKPASS" If .Nm needs a passphrase, it will read the passphrase from the current diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c index 98772e8d3e3..78e15204304 100644 --- a/usr.bin/ssh/ssh-add.c +++ b/usr.bin/ssh/ssh-add.c @@ -7,7 +7,7 @@ */ #include "includes.h" -RCSID("$Id: ssh-add.c,v 1.14 1999/11/24 16:13:45 markus Exp $"); +RCSID("$Id: ssh-add.c,v 1.15 1999/12/02 20:05:40 markus Exp $"); #include "rsa.h" #include "ssh.h" @@ -100,8 +100,12 @@ add_file(AuthenticationConnection *ac, const char *filename) } RSA_free(public_key); - if (!interactive && getenv("DISPLAY")) - askpass = getenv("SSH_ASKPASS"); + if (!interactive && getenv("DISPLAY")) { + if (getenv(SSH_ASKPASS_ENV)) + askpass = getenv(SSH_ASKPASS_ENV); + else + askpass = SSH_ASKPASS_DEFAULT; + } /* At first, try empty passphrase */ success = load_private_key(filename, "", key, &comment); diff --git a/usr.bin/ssh/ssh.h b/usr.bin/ssh/ssh.h index 59e4af49adb..ba7de195013 100644 --- a/usr.bin/ssh/ssh.h +++ b/usr.bin/ssh/ssh.h @@ -13,7 +13,7 @@ * */ -/* RCSID("$Id: ssh.h,v 1.28 1999/12/01 16:54:35 markus Exp $"); */ +/* RCSID("$Id: ssh.h,v 1.29 1999/12/02 20:05:40 markus Exp $"); */ #ifndef SSH_H #define SSH_H @@ -151,6 +151,13 @@ #define SSH_AGENTPID_ENV_NAME "SSH_AGENT_PID" /* + * Default path to ssh-askpass used by ssh-add, + * environment variable for overwriting the default location + */ +#define SSH_ASKPASS_DEFAULT "/usr/X11R6/bin/ssh-askpass" +#define SSH_ASKPASS_ENV "SSH_ASKPASS" + +/* * Force host key length and server key length to differ by at least this * many bits. This is to make double encryption with rsaref work. */ |