in reply to Re^2: SSH2 for windows
in thread SSH2 for windows

The code is completely working, I am able to connect and execute chain of commands in the remote host (through shell). But only thing is, I don't get any output (i.e. Not getting the return value after execution of the command).

Replies are listed 'Best First'.
Re^4: SSH2 for windows
by syphilis (Archbishop) on Nov 29, 2006 at 03:55 UTC
      Hi Rob,

      Test, Only ran 11

      1..72 ok 1 - use Net::SSH2; ok 2 - new session isa Net::SSH2 ok 3 - error state clear ok 4 - set banner ok 5 - LIBSSH2_* constants ok 6 - libSSH2 version 0.14 > 0.11 ok 7 - list version match ok 8 - API date yyyymmddhhmm ok 9 - banner is SSH-2.0-libssh2_0.14 ok 10 - poll indefinite ok 11 - poll 1/4 second To test the connection capabilities of Net::SSH2, we need a test site +running a secure shell server daemon. Enter 'localhost' to use this host. Select host [ENTER to skip]: localhost Net::SSH2::connect: failed to connect to localhost:22: Unknown error a +t 1 line 5 7 # Looks like you planned 72 tests but only ran 11. # Looks like your test died just after 11.

        Hi shanthiann,

        Select host [ENTER to skip]: localhost

        What happens if, instead of "localhost", you enter the secure shell server that you're trying to connect to (ie the "$hostname" in your script) ?

        Cheers,
        Rob
      Hi Rob,

      Test, Only ran 11

      1..72 ok 1 - use Net::SSH2; ok 2 - new session isa Net::SSH2 ok 3 - error state clear ok 4 - set banner ok 5 - LIBSSH2_* constants ok 6 - libSSH2 version 0.14 > 0.11 ok 7 - list version match ok 8 - API date yyyymmddhhmm ok 9 - banner is SSH-2.0-libssh2_0.14 ok 10 - poll indefinite ok 11 - poll 1/4 second To test the connection capabilities of Net::SSH2, we need a test site +running a secure shell server daemon. Enter 'localhost' to use this host. Select host [ENTER to skip]: localhost Net::SSH2::connect: failed to connect to localhost:22: Unknown error a +t 1 line 5 7 # Looks like you planned 72 tests but only ran 11. # Looks like your test died just after 11.

      Could you please advice me
      Is there any other simple way to trap the output of the channel
      Please forgive me, if the question is silly!!.