> I suggest that you use the agent support. Use libssh2-1.2.4 or later.
>
> The agent support uses ssh-agent on Linux and Pageant on Windows.
I think that is no option for me, because my chief will be not happy if
I use a extra program which is show as tray icon at task bar.
By the way I use libssh2-1.2.5
> src/userauth.c file_read_publickey() has this code:
>
> /* Read Public Key */
> fd = fopen(pubkeyfile, "r");
> if (!fd) {
> return _libssh2_error(session, LIBSSH2_ERROR_FILE,
> "Unable to open public key file");
> }
> while (!feof(fd)&& (c = fgetc(fd)) != '\r'&& c != '\n')
> pubkey_len++;
>
> You could try to change "r" in the call to fopen() into "rb" instead.
>
> If you're not comfortable recompiling libssh2 then run unix2dos or
> something similar on the key files, to convert their line endings.
>
> I think we should be line ending agnostic in libssh2, so the code
> above should be fixed. I'll have a look.
I tried it with three different unix2dos tools and it makes no
difference, the function returned always
the same error code.
At the moment I use a precompilied windows version of libss2 from
"http://josefsson.org/gnutls4win/",
because last week I try to compile my own version, but it failed. I will
try this again today.
Regards,
Thomas
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-05-12