I agree that this would be a simple solution. However, maybe I am missing something b/c when I run the simple example the code hangs <forever> ... see below

bash$ ./test-ssh.pl
MYWIN: Reading configuration data /.ssh/config
MYWIN: Reading configuration data /etc/ssh_config
MYWIN: Connecting to {host}, port 22.
MYWIN: Remote protocol version 2.0, remote software version OpenSSH_3.9p1
MYWIN: Net::SSH::Perl Version 1.28, protocol version 2.0.
MYWIN: No compat match: OpenSSH_3.9p1.
MYWIN: Connection established.
MYWIN: Sent key-exchange init (KEXINIT), wait response.
MYWIN: Algorithms, c->s: 3des-cbc hmac-sha1 none
MYWIN: Algorithms, s->c: 3des-cbc hmac-sha1 none
MYWIN: Entering Diffie-Hellman Group 1 key exchange.
MYWIN: Sent DH public key, waiting for reply.
MYWIN: Received host key, type 'ssh-dss'.
MYWIN: Host 'xx.xx.xx.xx' is known and matches the host key.
MYWIN: Computing shared secret key.
MYWIN: Verifying server signature.
MYWIN: Waiting for NEWKEYS message.
MYWIN: Enabling incoming encryption/MAC/compression.
MYWIN: Send NEWKEYS, enable outgoing encryption/MAC/compression.
MYWIN: Sending request for user-authentication service.
MYWIN: Service accepted: ssh-userauth.
MYWIN: Trying empty user-authentication request.
MYWIN: Authentication methods that can continue: publickey,password,keyboard-interactive.
MYWIN: Next method to try is publickey.
MYWIN: Next method to try is password.
MYWIN: Trying password authentication.
MYWIN: Login completed, opening dummy shell channel.
MYWIN: channel 0: new client-session
MYWIN: Requesting channel_open for channel 0.
MYWIN: channel 0: open confirm rwindow 0 rmax 32768
MYWIN: Got channel open confirmation, requesting shell.
MYWIN: Requesting service shell on channel 0.
MYWIN: channel 1: new client-session
MYWIN: Requesting channel_open for channel 1.
MYWIN: Entering interactive session.
MYWIN: Sending command: /usr/WebSphere/CommerceServer/bin/dataload/data/../test1.sh
MYWIN: Requesting service exec on channel 1.
MYWIN: channel 1: open confirm rwindow 0 rmax 32768


In reply to Re^2: Net::SSH2::Channel question by drfunk2458
in thread Net::SSH2::Channel question by drfunk2458

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.