Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: unable to use SSH_ASKPASS |
|---|---|
| Date: | Fri, 5 Aug 2005 12:20:28 -0400 |
On Fri, Aug 05, 2005 at 09:50:47AM +0300, Popeanga Marian wrote:
starting ssh from a shell script and setting SSH_ASKPASS and DISPLAY should involve executing the $SSH_ASKPASS. Till now i wasn't able to do it.
The key is the first phrase from the section of the man page you
quoted:
If ssh DOES NOT have a terminal associated with it [emphasis added
by me.]
A shell script that you start from your command line DOES have a
terminal associated with it, so if you are starting your test script
from the command line, it will not invoke the program specified by
SSH_ASKPASS. As the man page explains, this is mostly useful for
starting ssh from ~/.xsession (to start an ssh session while your X
Window System session is starting up).
The sentence before that is also important:
SSH_ASKPASS
If ssh needs a passphrase, it will read the passphrase
from the current terminal if it was run from a terminal.
If you run ssh from your terminal, INCLUDING if you run it in a shell
script started from a terminal, the passphrase will be prompted for on
the terminal.
The reason it works from .xsession (or similar files) is because these
scripts were NOT started from a terminal... They were started by the
X window system directly, which in turn was started by (usually) init.
None of these processes have a controlling terminal, so neither will
.xsession (or an ssh session started from it).
--
Derek D. Martin
http://www.pizzashack.org/
GPG Key ID: 0x81CFE75D
pgpcZcxx2NnJ3.pgp
Description: PGP signature
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | sshd dropping connection after authentication succeeds (4.1p1), Hespelt, Steve (Exchange) |
|---|---|
| Next by Date: | Re: Effective bandwidth reduction over WAN, Peter KjellstrÃm |
| Previous by Thread: | unable to use SSH_ASKPASS, Popeanga Marian |
| Next by Thread: | sshd dropping connection after authentication succeeds (4.1p1), Hespelt, Steve (Exchange) |
| Indexes: | [Date] [Thread] [Top] [All Lists] |