in reply to Re: net::ssh2 connection
in thread net::ssh2 connection

C:\Perl>perl ssh2.pl Unable to login Net::SSH2::DESTROY object 0x1a44f1c
The Fedora box is just my test box so I will put it into debug as well and see what I can get.

Replies are listed 'Best First'.
Re^3: net::ssh2 connection
by sintoad (Initiate) on Nov 03, 2008 at 20:31 UTC
    Okay, Debugged the server. My server accepts the key just fine. The connection is closed by my WinXp box.
    Connection closed by "my authenticating host" dispatch_protocol_error: type 90 seq 5 fatal: read from socket failed:connection reset by peer
Re^3: net::ssh2 connection
by syphilis (Archbishop) on Nov 03, 2008 at 23:28 UTC
    Unable to login

    I was wondering if there could be a problem with the way that auth_publickey() reads file with windows line endings. In the libssh2 library, the public file is read with:
    while (!feof(fd) && (c = fgetc(fd)) != '\r' && c != '\n') pubkey_len++;
    I was thinking that perhaps, for windows line endings, that needs to be:
    while (!feof(fd) && (c = fgetc(fd)) != '\r' && c != '\n' && c != 10) pubkey_len++;
    I guess you could check that by storing the keys in files with nix line endings, and see if that makes any difference. Other than that, it might be useful to find out what  dispatch_protocol_error: type 90 seq 5 actually means. (Or it might not :-)

    Cheers,
    Rob

        But why would the server then accept the key just fine?

        syphilis: wouldn't both c != '\n' and c != 10 effectively test the same thing?