in reply to Net::SSH::Perl Login

Once again, thanks so far. I have tried the sugested method and I have got a little further. As well as changing my code I have switched on the debug mode. Bellow is the code that I am using

#perl use Net::SSH::Perl; $identity = ".ssh/id_dsa"; $debug_level = 1; $protocol = 1; $host = "192.211.12.45"; $usr = "dm"; $args{identity_files} = [ $identity ]; $args{debug} = [ $debug_level ]; $args{protocol} = $protocol; $ssh = Net::SSH::Perl->new( $host, %args); $ssh->login("$usr");
And here is the output that I get from the code when I run it.
target: Reading configuration data /home/dm/.ssh/config target: Reading configuration data /etc/ssh_config target: Connecting to 192.211.12.45, port 22. target: Remote protocol version 1.99, remote software version OpenSSH_ +3.1p1 target: Net::SSH::Perl Version 1.23, protocol version 1.5. target: No compat match: OpenSSH_3.1p1. target: Connection established. target: Waiting for server public key. target: Received server public key (768 bits) and host key (1024 bits) +. target: Host '192.211.12.45' is known and matches the host key. target: Encryption type: DES3 target: Sent encrypted session key. target: Received encryption confirmation. target: RSA authentication failed: Can't load public key. target: Doing challenge response authentication. target: No challenge presented. target: Trying password authentication. target: Will not query passphrase in batch mode.
It looks to me like I have a problem with the file that I am presenting? Which file should I be presenting, as you can see from the code I am using the id_dsa file.
I hope this error is meaningful to someone :-)

Thanks again so far.

Replies are listed 'Best First'.
Re: Re: Net::SSH::Perl Login
by idsfa (Vicar) on Oct 08, 2003 at 18:27 UTC

    The key there is:

    target: Will not query passphrase in batch mode.

    As the document I referenced before indicates, a private key will only be usable in batch mode if it is not encrypted. You can test this by creating a key with no passphrase on it:

    $ ssh-keygen -t rsa -N '' -f testkey

    Remember, when you stare long into the abyss, you could have been home eating ice cream.