View | Details | Raw Unified | Return to bug 69 | Differences between
and this patch

Collapse All | Expand All

(-)ssh.h (+5 lines)
Lines 82-87 Link Here
82
#define SSH_ASKPASS_ENV		"SSH_ASKPASS"
82
#define SSH_ASKPASS_ENV		"SSH_ASKPASS"
83
83
84
/*
84
/*
85
 * Environment variable for forcing the use of askpass
86
 */
87
#define SSH_ALWAYS_ASKPASS_ENV	"SSH_ALWAYS_ASKPASS"
88
89
/*
85
 * Force host key length and server key length to differ by at least this
90
 * Force host key length and server key length to differ by at least this
86
 * many bits.  This is to make double encryption with rsaref work.
91
 * many bits.  This is to make double encryption with rsaref work.
87
 */
92
 */
(-)readpass.c (-1 / +1 lines)
Lines 119-125 Link Here
119
			use_askpass = 1;
119
			use_askpass = 1;
120
	}
120
	}
121
121
122
	if (use_askpass && getenv("DISPLAY")) {
122
	if (getenv(SSH_ALWAYS_ASKPASS_ENV) || use_askpass) {
123
		if (getenv(SSH_ASKPASS_ENV))
123
		if (getenv(SSH_ASKPASS_ENV))
124
			askpass = getenv(SSH_ASKPASS_ENV);
124
			askpass = getenv(SSH_ASKPASS_ENV);
125
		else
125
		else
(-)ssh.1 (-5 / +10 lines)
Lines 1261-1274 Link Here
1261
terminal if it was run from a terminal.
1261
terminal if it was run from a terminal.
1262
If
1262
If
1263
.Nm
1263
.Nm
1264
does not have a terminal associated with it but
1264
does not have a terminal associated with and
1265
.Ev DISPLAY
1266
and
1267
.Ev SSH_ASKPASS
1265
.Ev SSH_ASKPASS
1268
are set, it will execute the program specified by
1266
are set, it will execute the program specified by
1269
.Ev SSH_ASKPASS
1267
.Ev SSH_ASKPASS
1270
and open an X11 window to read the passphrase.
1268
to read the passphrase. This is particularly useful when calling
1271
This is particularly useful when calling
1272
.Nm
1269
.Nm
1273
from a
1270
from a
1274
.Pa .Xsession
1271
.Pa .Xsession
Lines 1277-1282 Link Here
1277
may be necessary to redirect the input from
1274
may be necessary to redirect the input from
1278
.Pa /dev/null
1275
.Pa /dev/null
1279
to make this work.)
1276
to make this work.)
1277
.It Ev SSH_ALWAYS_ASKPASS
1278
If this environment variable is set, 
1279
.Nm ssh 
1280
will always request passwords via 
1281
.Ev SSH_ASKPASS ,
1282
regardless of whether 
1283
.Nm ssh 
1284
has a terminal associated with it.
1280
.It Ev SSH_AUTH_SOCK
1285
.It Ev SSH_AUTH_SOCK
1281
Identifies the path of a unix-domain socket used to communicate with the
1286
Identifies the path of a unix-domain socket used to communicate with the
1282
agent.
1287
agent.

Return to bug 69