unable to connect to SuSE using net::ssh::perl module
am 10.03.2006 04:23:31 von AnuHi,
I am trying to connect from Fedora Core 4 machine to SuSE 9 Enterprise
Server machine using Net::SSH::Perl module. My code terminates at the
call of the login method with a "Permission denied" message. The
credentials provided by me are correct I am able to SSH to the SuSE
machine from the terminal using the same credentials as in the perl
program. Can someone please help me figure out the problem.
the OpenSSH version on the SuSE machine is OpenSSH_3.8p1 and
the OpenSSH version on the Fedora machine is OpenSSH_4.2p1.
the perl installed is perl-5.8.6-15
the Net::SSH::Perl i am using is Net-SSH-Perl-1.29
my code :
sub ssh_connect{
my($host,$uname,$pwd,$cmdstr)=@_;
#opening connection with the remote host by creating object and
providing credentials
my $objfnssh = Net::SSH::Perl->new($host,compression=>1, debug=>1,
protocol=>'2,1');
$objfnssh->login($uname,$pwd);
my @out=$objfnssh->cmd($cmdstr);
#print @out;
}
output :
Reading configuration data /home/anuradha_moturi/.ssh/config
xxxxx: Reading configuration data /etc/ssh_config
xxxxx: Connecting to 172.21.130.41, port 22.
xxxxx: Remote protocol version 1.99, remote software version
OpenSSH_3.8p1
xxxxx: Net::SSH::Perl Version 1.29, protocol version 2.0.
xxxxx: No compat match: OpenSSH_3.8p1.
xxxxx: Connection established.
xxxxx: Sent key-exchange init (KEXINIT), wait response.
xxxxx: Algorithms, c->s: 3des-cbc hmac-sha1 zlib
xxxxx: Algorithms, s->c: 3des-cbc hmac-sha1 zlib
xxxxx: Entering Diffie-Hellman Group 1 key exchange.
xxxxx: Sent DH public key, waiting for reply.
xxxxx: Received host key, type 'ssh-dss'.
xxxxx: Permanently added '172.21.130.41' to the list of known hosts.
xxxxx: Computing shared secret key.
xxxxx: Verifying server signature.
xxxxx: Waiting for NEWKEYS message.
xxxxx: Enabling incoming encryption/MAC/compression.
xxxxx: Send NEWKEYS, enable outgoing encryption/MAC/compression.
xxxxx: Sending request for user-authentication service.
xxxxx: Service accepted: ssh-userauth.
xxxxx: Trying empty user-authentication request.
xxxxx: Authentication methods that can continue:
publickey,keyboard-interactive.
xxxxx: Next method to try is publickey.
Permission denied at ./res_ssh.pl line 75