[Pdx-pm] Net::SSH::Perl

Robby Russell robbyrussell at pdxlug.org
Thu Jan 29 15:51:00 CST 2004

Tom Phoenix typed this on 01/29/2004 01:12 PM:
> On Thu, 29 Jan 2004, Robby Russell wrote:
>>>	then grep open script.out. Maybe there's some odd permissions problem.
>> From the readkey area of the output:
>>O_RDONLY) = 5
>>24548 read(5, 
> Waitaminute. It shouldn't need ReadKey.so until it has already decided to
> ask for the password. Unless I'm missing something.
> If you don't want it to ask you, check a little earlier to see whether it
> failed to open some file, or whether it checked the permissions on some
> file, and found it unreadable. "Some file" probably being the one with the
> needed key (to use in place of the password).
> Also, try the -v option, possibly more than once, when you connect with
> ssh directly; you may find out that your ssh client is getting your key
> from someplace you didn't expect, and that source may not be accessible to
> the Perl module without some extra guidance. (You may be running
> ssh-agent, for example, or maybe your ssh client is running as a different
> user-ID than your Perl program.)
> Good luck with it!
> --Tom Phoenix

Found this above the ReadKey area of the strace:

24737 read(5, "", 4096)                 = 0
24737 close(5)                          = 0
24737 write(2, "dev: RSA authentication failed: "..., 55) = 55
24737 write(2, "dev: Doing challenge response au"..., 46) = 46
24737 write(4, "\0\0\0\0052\223\224p\252*\2)", 12) = 12
24737 select(8, [4], NULL, NULL, NULL)  = 1 (in [4])

For example:
I have user1.
user1 can at the bash shell go, ssh remoteuser at remotehost
logs in, no questions asked

user1 executes script which runs doesn't run as any other user, gets 
prompted for password.


More information about the Pdx-pm-list mailing list