in reply to Re: Net::SSH::Perl problems
in thread Net::SSH::Perl problems

Opps.. sorry forgot the error message. Here is the output of the Net::SSH::Perl debug data when the script runs. Any ideas?
[mcunning@localhost mcunning]$ ./collector.pl > mike localhost.localdomain: Reading configuration data /home/mcunning/.ssh/config localhost.localdomain: Reading configuration data /etc/ssh_config localhost.localdomain: Connecting to dumbo-temp, port 22. localhost.localdomain: Remote protocol version 1.99, remote software version OpenSSH_3.5p1 localhost.localdomain: Net::SSH::Perl Version 1.23, protocol version 2 +.0. localhost.localdomain: No compat match: OpenSSH_3.5p1. localhost.localdomain: Connection established. localhost.localdomain: Sent key-exchange init (KEXINIT), wait response +. localhost.localdomain: Algorithms, c->s: 3des-cbc hmac-sha1 none localhost.localdomain: Algorithms, s->c: 3des-cbc hmac-sha1 none localhost.localdomain: Entering Diffie-Hellman Group 1 key exchange. localhost.localdomain: Sent DH public key, waiting for reply. localhost.localdomain: Received host key, type 'ssh-dss'. localhost.localdomain: Host 'dumbo-temp' is known and matches the host + key. localhost.localdomain: Computing shared secret key. localhost.localdomain: Verifying server signature. localhost.localdomain: Waiting for NEWKEYS message. localhost.localdomain: Enabling incoming encryption/MAC/compression. localhost.localdomain: Send NEWKEYS, enable outgoing encryption/MAC/compression. localhost.localdomain: Sending request for user-authentication service +. localhost.localdomain: Service accepted: ssh-userauth. localhost.localdomain: Trying empty user-authentication request. localhost.localdomain: Authentication methods that can continue: publickey,password,keyboard-interactive. localhost.localdomain: Next method to try is publickey. localhost.localdomain: Next method to try is password. localhost.localdomain: Trying password authentication. localhost.localdomain: Will not query passphrase in batch mode. localhost.localdomain: Authentication methods that can continue: publickey,password,keyboard-interactive. localhost.localdomain: Next method to try is publickey. localhost.localdomain: Next method to try is password. localhost.localdomain: Trying password authentication. localhost.localdomain: Will not query passphrase in batch mode. localhost.localdomain: Authentication methods that can continue: publickey,password,keyboard-interactive. localhost.localdomain: Next method to try is publickey. localhost.localdomain: Next method to try is password. localhost.localdomain: Trying password authentication. localhost.localdomain: Will not query passphrase in batch mode. localhost.localdomain: Authentication methods that can continue: publickey,password,keyboard-interactive. localhost.localdomain: Next method to try is publickey. localhost.localdomain: Next method to try is password. Permission denied at ./collector.pl line 34

Replies are listed 'Best First'.
Re: Re: Re: Net::SSH::Perl problems
by jaa (Friar) on May 28, 2003 at 14:56 UTC
    the documentation says:
    * identity_files ... If you don't provide this, RSA authentication defaults to using $ENV{HOME}/.ssh/identity, and DSA authentication defaults to $ENV{HOME}/.ssh/id_dsa.

    So if your identity is in id_rsa.pub maybe you should let the object know that during instantiation:

    my $ssh = Net::SSH::Perl->new( $host, identity_files => ["$ENV{HOME}/.ssh/id_rsa.pub"], );
      That helped but didnt solve the problem.. now it is trying to use public key auth but it fails cause its in batch mode and it thinks it needs a passphrase. I put it in interactive mode but it now demands a passphrase (which the key doesnt have) and fails when I just hit enter. I need it to use batch mode and public key.. Thanks for your help.. Crayola
Re: Re: Re: Net::SSH::Perl problems
by Anonymous Monk on May 28, 2003 at 16:30 UTC
    Well it looks like it pays to read the authors ToDO file. for Net::ssh::Perl. It only supports dsa public key authentication not rsa. As soon as I setup a dsa key it worked great. Thanks all for your help. Crayola