No password prompt for ssh from perl script

Darren Tucker dtucker at
Tue Jul 10 23:04:04 EST 2007

Aftab Ahamed wrote:
> Hi,
> I need some help from you guys for one issue I am facing with my script. 
> While logging into localhost using ssh from command prompt it works:
>    It works from command prompt --> ssh loginid at localhost
> 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.
> We are getting following instead of password prompt:
> Permission denied, please try again.
> Permission denied, please try again.
> Permission denied (publickey,password,keyboard-interactive)
> We are using OpenSSH in AIX 5.3 and Perl 5.8.2
> Any one has any idea on this why this issue might have occured. If anyone 
> wants to see the code, I can send it. It would be great help if anyone can 
> help in this regard

This can happen if /dev/tty has the wrong permissions (should be mode 666).

Darren Tucker (dtucker at
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
     Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

More information about the openssh-unix-dev mailing list