No password prompt for ssh from perl script

Jim Knoble jmknoble at pobox.com
Wed Jul 11 03:40:21 EST 2007


Circa 2007-07-10 09:49 dixit Darren Tucker:

: Aftab Ahamed wrote:
: > I need some help from you guys for one issue I am facing with my script. 
: > [...]
: > But when we try to login to localhost using ssh from perl script using 
: > pseudo terminal, I am getting the following without any password prompt.
: > 
: > Permission denied, please try again.
: > Permission denied, please try again.
: > Permission denied (publickey,password,keyboard-interactive)
: 
: You can also set the SSH_ASKPASS environment variable to point to a 
: program that supplies the password and do away with the pty.

Unless things have changed recently, you'll also need to detach from the
controlling terminal using setsid(2) or an equivalent.  Under Linux,
the setsid(1) command can do this for you:

    setsid ssh someone at somwhere ...

You may also need to ensure the DISPLAY environment variable is set.  

Good luck.

-- 
jim knoble  |  jmknoble at pobox.com  |  http://www.pobox.com/~jmknoble/
(GnuPG key ID: 6F39C2CC  >>>>>>  http://www.pobox.com/~jmknoble/keys/ )
(GnuPG fingerprint: 5024:D578:7CF4:5660:7269::F6F3:B919:9307:6F39:C2CC)
+----------------------------------------------------------------------+
|[L]iberty, as we all know, cannot flourish in a country that is perma-|
| nently on a war footing, or even a near-war footing.  --Aldous Huxley|
+----------------------------------------------------------------------+


More information about the openssh-unix-dev mailing list