Hello Salva and others ... Can you please help me as I am getting error while trying to ssh to a HP-UX box from Linux Machine.I am getting below error ....
[bmallik@null-001485a93da4 ~]$ perl -w RDF.pl ********************************************************************** +***** Qwest computers and the Qwest computer network are Qwest property. Only authorized persons may use them and only for legal and proper pur +poses as determined solely by Qwest. Users consent to the monitoring of the +ir use. Employees must use Qwest computers and the network in accordance with +the Qwest Code of Conduct, subject to discipline for misuse. Customer use +is governed by the Qwest Acceptable Use Policy. ---------------------------------------------------------------------- +---- NOTE: This server is NOT under IBM full support. Instead it is under a Maintenance Plus contract and support is through a Qwest support group +. For UNIX system adminstration support and work requests for this syste +m, please refer to the instructions found on this URL: http://sm-unix.uswc.uswest.com or contact the Help Desk at 1-877-828-4357 (see TheQ web page). ********************************************************************** +***** Couldn't establish SSH connection: unable to establish master SSH conn +ection: control command failed: child exited with code 1 at RDF.pl li +ne 14. [bmallik@null-001485a93da4 ~]$
SO This error comes just after it try to be connected ....I dont know wehre it gets stucked.I am not a perl expert.I am giving the code also as below ...
#!/usr/bin/perl use Net::OpenSSH; #use Math::Pari; my $host="hplwp638"; my $user="radarop"; my $password="XXXXX"; #$InHandle = $ssh->input_log("RDFinlog.txt"); #$OutHandle = $ssh->output_log("RDFoutlog.txt"); my $ssh= Net::OpenSSH->new($host,user=>$user, passwd=>$password); $ssh->error and warn "Couldn't establish SSH connection: ". $ssh->erro +r; #print "Trying to connect to $host now\n"; #$ssh->waitfor(String => 'hplwp638#[/home/radarop]'); #print $ssh->cmd("who"); my @output = $ssh->capture("who"); print @output;
Now I am getting below erroe after changing my code in a single line ....
my $ssh= Net::OpenSSH->new($host,user=>$user, passwd=>$password, stric +t_mode => 0, ctl_dir => "/tmp/~.libnet-openssh-perl" );
Error
[bmallik@null-001485a93da4 ~]$ perl -w RDF.pl Couldn't establish SSH connection: unable to establish master SSH conn +ection: the authenticity of the target host can't be established, the + remote host public key is probably not present on the '~/.ssh/known_ +hosts' file at RDF.pl line 14.

In reply to Error in Login by useing Net::OpenSSH by bighnaraj

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.