Dear Monks,
I am using Net::OpenSSH module and when i run the script it prompts me for password and after keying in the password to remote server it fails with below error message.
Note : I can already ssh from my working server to the remote server hence no network issues here.
In some other threads i also set "ControlMaster yes" in /etc/ssh/ssh_config but that didn't help. Can some one point me to right direction? I had tried installing Net:SSH:Perl but with no success ( will post another thread for getting help on that)
Platform : Linux (RH-4) Perl version : ActivePerl-5.14.2.1402
Error Message : unable to establish master SSH connection: control command failed: chi +ld exited with code 1 Verbose Logs ( error is at last line) : debug1: Trying to start again debug2: we sent a gssapi-with-mic packet, wait for reply debug1: Authentications that can continue: gssapi-keyex,gssapi-with-mi +c,publickey,password,keyboard-interactive debug2: we did not send a packet, disable method debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Trying private key: /home/kanerku/.ssh/id_rsa debug3: no such identity: /home/kanerku/.ssh/id_rsa debug1: Trying private key: /home/kanerku/.ssh/id_dsa debug3: no such identity: /home/kanerku/.ssh/id_dsa debug2: we did not send a packet, disable method debug3: authmethod_lookup keyboard-interactive debug3: remaining preferred: password debug3: authmethod_is_enabled keyboard-interactive debug1: Next authentication method: keyboard-interactive debug2: userauth_kbdint debug2: we sent a keyboard-interactive packet, wait for reply debug2: input_userauth_info_req debug2: input_userauth_info_req: num_prompts 1 Password: debug3: packet_send2: adding 32 (len 23 padlen 9 extra_pad 64) debug1: Authentication succeeded (keyboard-interactive). debug2: fd 4 setting O_NONBLOCK debug1: Entering interactive session. debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 2.6 seconds debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0 debug1: Exit status 0 Couldn't establish SSH connection: unable to establish master SSH conn +ection: control command failed: child exited with code 1 at ./gen_pas +swd.pl line 21.
PERL SCRIPT :
#! /usr/local/ActivePerl-5.14.2.1402/bin/perl use Net::OpenSSH; my $host="zhkdsd201"; my $ssh = Net::OpenSSH->new($host, user => 'hkuat', master_opts => '-vvv', strict_mode => 0 ); $ssh->error and die "Couldn't establish SSH connection: ". $ssh->error;

In reply to Net::OpenSSH - unable to establish master SSH connection: control command failed by udvk009

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.