
gopisera
Novice
Apr 3, 2010, 7:19 AM
Post #1 of 11
(16232 views)
|
Reg: Net::OpenSSH module
|
Can't Post
|
|
Hi, I have installed Net::OpenSSH module successfully. When i am using the object and calling the constructor i am getting the following error SSH connection failed: unable to establish master SSH connection: ssh master exited unexpectedly at connect.pl line 19. The program Source Code is #!/usr/local/bin/perl -wTU use vars; use lib "/export/home/oracle/scripts/gopisera/IO-Tty/lib/site_perl/5.8.4/sun4-solaris-64int"; use lib "/export/home/oracle/scripts/gopisera/lib/perl5/site_perl/5.8.0"; use lib "/usr/local/lib/perl5/5.8.0"; #use lib "/u01/app/oracle/product/10.2.0/Apache/Apache/cgi-bin/gopisera/username/Net-SSH-Expect-1.09/lib/Net/SSH"; #use lib "/export/home/oracle/scripts/gopisera/lib/perl5/site_perl"; #use lib "/export/home/oracle/scripts/gopisera/IOT/lib/site_perl/5.8.4/sun4-solaris-64int"; use strict; use Net::OpenSSH; delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; $ENV{'PATH'}=''; my $ssh = Net::OpenSSH->new('oracle@10.14.2.150', password => 'xxxxx', ssh_cmd => '/usr/local/bin/ssh', master_stderr_discard => 1); $ssh->error and die "SSH connection failed: " . $ssh->error; my $command = "ls"; my @out = $ssh->capture($command); print "@out"; I have tried variously, such as below #my $ssh = Net::OpenSSH->new('gopisera@[172.30.231.231]', passwd => 'xxxxxx', master_stderr_discard => 1); #my $ssh = Net::OpenSSH->new('172.30.231.231', user => 'gopisera', port => '22', passwd => 'xxxxxx', master_stderr_discard => 1); #my $ssh = Net::OpenSSH->new('oracle@172.30.231.243:22'); But still i am facing the same problem............... Can any one rectify the above ...... let me know I have few more doubts regarding this What are the neccessary i mean compulsary parameters to send through this constructor.... The modules are installed correctly and while installing all it shows success i mean the make test is successfull. Please respond for this ......... It's very urgent>>>>>>> Waiting for the reply,,,, Thanks, Ramesh G
|