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

Does the test script (that comes with the module's source) pass all tests ? You'll find it at http://search.cpan.org/src/DBROBINS/Net-SSH2-0.09/t/Net-SSH2.t

Cheers,
Rob

Replies are listed 'Best First'.
Re^5: SSH2 for windows
by shanthiann (Acolyte) on Dec 06, 2006 at 10:08 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.

    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!!.
Re^5: SSH2 for windows
by shanthiann (Acolyte) on Dec 06, 2006 at 10:05 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
        Dear Rob,

        Now it ran upto 22 test, after giving a secure host ip.
        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]: 10.123.3.9 ok 12 - connect to 10.123.3.9 ok 13 - kex method: diffie-hellman-group-exchange-sha1 ok 14 - hostkey method: ssh-rsa ok 15 - crypt_cs method: aes256-cbc ok 16 - crypt_sc method: aes256-cbc ok 17 - mac_cs method: hmac-sha1 ok 18 - mac_sc method: hmac-sha1 ok 19 - comp_cs method: none ok 20 - comp_sc method: none ok 21 - have MD5 hostkey hash ok 22 - have SHA1 hostkey hash The getpwuid function is unimplemented at 1 line 73, <STDIN> line 1. # Looks like you planned 72 tests but only ran 22. # Looks like your test died just after 22.


        Please advice