in reply to Re: strange Net::SSH2 on Solaris10
in thread strange Net::SSH2 on Solaris10

Rob,

Thanks for the reply.

But no errors here:
bash-3.00# perl testing.pl 1..73 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 - list version match ok 7 # skip version not decimal ok 8 - banner is SSH-2.0-libssh2_1.4.0 ok 9 - poll indefinite ok 10 - poll 1/4 second ok 11 - ->sock is undef before connect 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]: 192.168.1.98 ok 12 - connect to 192.168.1.98 ok 13 - ->sock isa IO::Socket::INET isa IO::Socket::INET ok 14 - kex method: diffie-hellman-group-exchange-sha1 ok 15 - hostkey method: ssh-rsa ok 16 - crypt_cs method: aes128-ctr ok 17 - crypt_sc method: aes128-ctr ok 18 - mac_cs method: hmac-sha1 ok 19 - mac_sc method: hmac-sha1 ok 20 - comp_cs method: none ok 21 - comp_sc method: none ok 22 - have MD5 hostkey hash ok 23 - have SHA1 hostkey hash Enter username [root]: netcool ok 24 - authenticate: gssapi-keyex,gssapi-with-mic,publickey,password, +keyboard-interactive ok 25 - list matches comma-separated ok 26 - not authenticated yet [user netcool] Password: ok 27 - authenticated via: keyboard ok 28 - authenticated successfully ok 29 - new channel isa Net::SSH2::Channel ok 30 - set blocking ok 31 - not at EOF ok 32 - normal extended data handling ok 33 - merge extended data ok 34 - empty setenv ok 35 - set environment variables ok 36 - verify session ok 37 - set disconnect callback ok 38 - SFTP session isa Net::SSH2::SFTP ok 39 - verify session ok 40 - create directory net_ssh2_1737 ok 41 - stat directory ok 42 - type is directory ok 43 - directory name matches ok 44 - put testing.pl to remote ok 45 # skip - IO::Scalar required ok 46 # skip - IO::Scalar required ok 47 - unlink non-existant file fails ok 48 - got LIBSSH2_FX_NO_SUCH_FILE error ok 49 - rename net_ssh2_1737/testing.pl -> net_ssh2_1737/testing.pl.re +named ok 50 - stat net_ssh2_1737/testing.pl.renamed ok 51 - stat filename matches ok 52 - stat filesize matches ok 53 - opened file isa Net::SSH2::File ok 54 - compare stat and fstat ok 55 - compare fstat % and %$ ok 56 - opened directory isa Net::SSH2::Dir ok 57 - found net_ssh2_1737/testing.pl.renamed ok 58 - opened file isa Net::SSH2::File ok 59 - read '\# THIS LINE WILL BE READ BY A TEST BELOW' ok 60 - unlink net_ssh2_1737/testing.pl.renamed ok 61 - remove directory net_ssh2_1737 ok 62 - close SFTP session ok 63 - exec 'ls -d /' ok 64 - got poll response ok 65 - got input event ok 66 - got result '/' ok 67 - no more lines ok 68 # skip - public key infrastructure not present ok 69 # skip - public key infrastructure not present ok 70 # skip - public key infrastructure not present ok 71 # skip - public key infrastructure not present ok 72 - close channel ok 73 - sent disconnect message

Thanks,
Ashok.

Replies are listed 'Best First'.
Re^3: strange Net::SSH2 on Solaris10
by syphilis (Archbishop) on May 30, 2012 at 00:18 UTC
    no errors here

    Good - no problems with that version of the libssh2 library. Are you certain that your failing script uses the very same libssh2 library ?

    Next thing to do would be to determine which line of code in your script is producing the error. I don't see anything in the subroutine you posted that should cause that error, so it probably happens before that sub is called.

    Cheers,
    Rob
      Rob,

      Are you certain that your failing script uses the very same libssh2 library ?

      I am using CGI pages under same environment. So I believe I am using same libssh2 library.

      I don't see anything in the subroutine you posted that should cause that error, so it probably happens before that sub is called.
      $ssh2->connect($rip)
      This is the code that is failing. Same parameters, same environment, same script. Not sure how to proceed on this and why it is throwing -43LIBSSH2_ERROR_UNKNOWN(-43)Failed getting banner error?

      Thanks,
      Ashok.