Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
        $ssh->cmd(`show lb vserver $csvserver`);

That is almost certainly not what you want to do. Your qx// example will run your "show lb ..." command on the local machine and attempt to run the output of that on the remote machine.

It sounds like the root issue of your problem is the "show" command. I would log on to the BSD machine and run "which show" for starters--it may be an alias, or, it might be a builtin of a particular shell on the system that doesn't happen to be the same as the shell for the "bluethundr" user you're logging in with with Net::SSH::Perl.

That being said, diagnostics are everything. I would also debug Net::SSH::Perl as well, by substituting a well-known command in place of "show". I typically start with something like this:

#$ssh->cmd("show lb vserver $csvserver"); my ($out, $err, $exit) = $ssh->cmd("echo show lb vserver $csvserver"); + # DEBUG warn "out = '$out', err = '$err', exit = $exit\n";

Which SSH protocol version are you using? You should be using v2. v1 does not support multiple commands per session.


In reply to Re^3: Net::SSH::Perl doesn't execute commands by rjt
in thread Net::SSH::Perl doesn't execute commands by bluethundr

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (11)
    As of 2014-10-01 15:06 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      What is your favourite meta-syntactic variable name?














      Results (29 votes), past polls