|
Posted by anu on March 9, 2006, 10:23 pm
Please log in for more thread options
Hi,
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
|
| Similar Threads | Posted | | Unable to connect a website using LWP | February 23, 2006, 4:31 am |
| Sockets - client unable to connect | May 1, 2006, 5:28 pm |
| After adding some Perl modules in my SuSE 8.2 installation Amavis does not function anymore. | December 12, 2004, 2:04 pm |
| Text::CHM on SuSE 9.3 x86_64 | September 19, 2005, 8:08 pm |
| Perl unable to find modules | August 12, 2004, 12:58 pm |
| Unable to load module | March 16, 2006, 12:00 am |
| Using Net::Telnet to connect to Perl server | January 22, 2005, 12:57 am |
| Error In Using Perl To Connect To MySQL | May 27, 2006, 2:59 am |
| Net::SSH::Perl to connect to a remote server via a web page | August 30, 2004, 10:02 am |
| Starting a perl program when I connect to the internet. | September 22, 2004, 3:34 pm |
|