summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>1999-12-02 20:05:41 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>1999-12-02 20:05:41 +0000
commite379614c3e051f291489c3ccf6c5361dd373171d (patch)
treee239a782532e5628225666d01256e4c33c1b537e
parent39fb7376a449490983a7b47a907d147f0ff35fab (diff)
document $SSH_ASKPASS, reasonable default
-rw-r--r--usr.bin/ssh/ssh-add.17
-rw-r--r--usr.bin/ssh/ssh-add.c10
-rw-r--r--usr.bin/ssh/ssh.h9
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.
*/