On 2005.6.3, at 03:20 AM, Ted Zeng wrote:

Hi,
I use Net::SSH::Perl to connect to a few Macs from a Mac.

To 2 of them, it works fine. But for others, the shell would have
password prompt  and I have to type the password at the shell to
make the script goes through.

I have tried to turn off any options that would ask for authentication.

Options in or to what? .ssh file? keychain? method call?

Even set the interactive option to 0 (The default is already false.)
But the problem doesn't go away. I turn the debug on and the log is in the end of this message.
For the two Macs that works, it has
No challenge presented.
Trying password authentication.

at the end instead of the password prompt.

Anyone has seen this problem before? I searched the net and found a couple of people
had this problem. But there were no answers to their questions.

Here is the script that I used:

    $user='name';
    $pass = 'password';
    $host = '111.22.33.444';
$params{debug} = 1;
$params{interactive} = 0;
my $ssh = Net::SSH::Perl->new($host,%params,options =>["BatchMode yes"]);
    $ssh->login($user, $pass);
    ($stdout, $stderr, $exit) = $ssh->cmd("ls");

ted zeng
Adobe Systems

======The debug log
Reading configuration data /Users/z/.ssh/config
Reading configuration data /etc/ssh_config
Connecting to ip, port 22.
Remote protocol version 1.99, remote software version OpenSSH_3.8.1p1
Net::SSH::Perl Version 1.27, protocol version 1.5.
No compat match: OpenSSH_3.8.1p1.
Connection established.
Waiting for server public key.
Received server public key (768 bits) and host key (1024 bits).
Host 'ip' is known and matches the host key.
Encryption type: DES3
Sent encrypted session key.
Received encryption confirmation.
RSA authentication failed: Can't load public key.
Doing challenge response authentication.
Password:

No challenge presented.
Trying password authentication.


Reply via email to