No password prompt for ssh from perl script

Aftab Ahamed hiaftab at hotmail.com
Wed Jul 11 17:28:15 EST 2007


It didnt work out. I have given below the permissions for /dev/pty* and 
/dev/tty*. I have also given logs from syslog which I forgot to give in my 
earlier email. Its still getting same error. Any idea?


****************** SYSLOG ***********************************************
Jul 11 03:22:10 auth|security:info sshd[667870]: Failed password for 
<<login_id>> from 127.0.0.1 port 62545 ssh2
Jul 11 03:22:10 auth|security:info syslog: ssh: failed login attempt for 
<<login_id>>from loopback
Jul 11 03:22:10 auth|security:info sshd[667870]: Failed password for 
<<login_id>> from 127.0.0.1 port 62545 ssh2
Jul 11 03:22:10 rscase03 auth|security:info syslog: ssh: failed login 
attempt for <<login_id>> from loopback
Jul 11 03:22:10 rscase03 auth|security:info sshd[667870]: Failed password 
for <<login_id>> from 127.0.0.1 port 62545 ssh2
Jul 11 03:22:10 rscase03 auth|security:info syslog: ssh: failed login 
attempt for <<login_id>> from loopback

******************************************************************************
[/dev]$ ls -l /dev/tty*
crw-rw-rw-   1 root     system        1,  0 Jul 11 02:23 /dev/tty
crw-rw-rw-   1 root     system       22,  0 Feb 15 13:16 /dev/ttyp0
crw-rw-rw-   1 root     system       22,  1 Feb 15 13:16 /dev/ttyp1
crw-rw-rw-   1 root     system       22,  2 Feb 15 13:16 /dev/ttyp2
crw-rw-rw-   1 root     system       22,  3 Feb 15 13:16 /dev/ttyp3
crw-rw-rw-   1 root     system       22,  4 Feb 15 13:16 /dev/ttyp4
crw-rw-rw-   1 root     system       22,  5 Feb 15 13:16 /dev/ttyp5
crw-rw-rw-   1 root     system       22,  6 Feb 15 13:16 /dev/ttyp6
crw-rw-rw-   1 root     system       22,  7 Feb 15 13:16 /dev/ttyp7
crw-rw-rw-   1 root     system       22,  8 Feb 15 13:16 /dev/ttyp8
crw-rw-rw-   1 root     system       22,  9 Feb 15 13:16 /dev/ttyp9
crw-rw-rw-   1 root     system       22, 10 Feb 15 13:16 /dev/ttypa
crw-rw-rw-   1 root     system       22, 11 Feb 15 13:16 /dev/ttypb
crw-rw-rw-   1 root     system       22, 12 Feb 15 13:16 /dev/ttypc
crw-rw-rw-   1 root     system       22, 13 Feb 15 13:16 /dev/ttypd
crw-rw-rw-   1 root     system       22, 14 Feb 15 13:16 /dev/ttype
crw-rw-rw-   1 root     system       22, 15 Feb 15 13:16 /dev/ttypf

[/dev]$ ls -l /dev/pty*
crw-rw-rw-   1 root     system       21,  0 Feb 15 13:16 /dev/ptyp0
crw-rw-rw-   1 root     system       21,  1 Feb 15 13:16 /dev/ptyp1
crw-rw-rw-   1 root     system       21,  2 Feb 15 13:16 /dev/ptyp2
crw-rw-rw-   1 root     system       21,  3 Feb 15 13:16 /dev/ptyp3
crw-rw-rw-   1 root     system       21,  4 Feb 15 13:16 /dev/ptyp4
crw-rw-rw-   1 root     system       21,  5 Feb 15 13:16 /dev/ptyp5
crw-rw-rw-   1 root     system       21,  6 Feb 15 13:16 /dev/ptyp6
crw-rw-rw-   1 root     system       21,  7 Feb 15 13:16 /dev/ptyp7
crw-rw-rw-   1 root     system       21,  8 Feb 15 13:16 /dev/ptyp8
crw-rw-rw-   1 root     system       21,  9 Feb 15 13:16 /dev/ptyp9
crw-rw-rw-   1 root     system       21, 10 Feb 15 13:16 /dev/ptypa
crw-rw-rw-   1 root     system       21, 11 Feb 15 13:16 /dev/ptypb
crw-rw-rw-   1 root     system       21, 12 Feb 15 13:16 /dev/ptypc
crw-rw-rw-   1 root     system       21, 13 Feb 15 13:16 /dev/ptypd
crw-rw-rw-   1 root     system       21, 14 Feb 15 13:16 /dev/ptype
crw-rw-rw-   1 root     system       21, 15 Feb 15 13:16 /dev/ptypf

Thanks
Aftab


From: Darren Tucker <dtucker at zip.com.au>
To: Aftab Ahamed <hiaftab at hotmail.com>
CC: openssh-unix-dev at mindrot.org
Subject: Re: No password prompt for ssh from perl script
Date: Tue, 10 Jul 2007 23:04:04 +1000
MIME-Version: 1.0
Received: from mailout1.pacific.net.au ([61.8.2.210]) by 
bay0-mc1-f13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Tue, 10 
Jul 2007 06:04:06 -0700
Received: from mail0.dtucker.net (203-217-17-96.perm.iinet.net.au 
[203.217.17.96])by mailout1.pacific.net.au (Postfix) with ESMTP id 
B25143841AFfor <hiaftab at hotmail.com>; Tue, 10 Jul 2007 23:04:05 +1000 (EST)
Received: from chimera.dtucker.net (localhost.localdomain [127.0.0.1])by 
mail0.dtucker.net (8.13.8/8.13.4) with ESMTP id l6AD44ZR001379;Tue, 10 Jul 
2007 23:04:05 +1000
X-Message-Info: 
LsUYwwHHNt3igTN6QK+bgGhKoXI0JcsPCdALPmEXtiLrSWr30Qr515ad6S6+M01K
User-Agent: Thunderbird 2.0.0.0 (X11/20070620)
References: <BAY130-F340A14A7FCADE03063C7A1BE050 at phx.gbl>
Return-Path: dtucker at zip.com.au
X-OriginalArrivalTime: 10 Jul 2007 13:04:06.0774 (UTC) 
FILETIME=[CC3C8160:01C7C2F2]

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 zip.com.au)
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.

_________________________________________________________________
Spice up your IM conversations. New, colorful and animated emoticons. Get 
chatting! http://server1.msn.co.in/SP05/emoticons/



More information about the openssh-unix-dev mailing list