Hi Atsuhiko,

today I was able to perform several tests... with strange behaviors:

(I'm working on Windows XP with Eclipse Ganimede)

1) New key pair from linux box (ssh-keygen -t dsa -b 1024), copied the
private one (id_dsa) to my PC and added the public one to authorized_keys2.
Converted the private key to "putty" format and test ok with WinSCP (using
the converted key as WinSCP needs keys in that format). With JSch the error
I reported before...

2) Using puttygen (a keygen tool included in Putty) generated a new key pair
(DSA/1024), exported the private one in OpenSSH format and added the public
one to authorized_keys2... JSch: *connection successful!*

So I think there could be differences between the two private keys... but
the two files seem identical (Unix format, same END-of-LINE...)

I was able to reproduce the behavior: if I use puttygen-generated keys JSch
works, if I use OpenSSH-generated keys it doesn't work... the same keys with
OpenSSH client (cygwin port) or - converted - with WinSCP work fine.
Suggestions? Thanks!


2010/5/25 Atsuhiko Yamanaka <[email protected]>

> Hi,
>
>   +-From: Luca Dentella <[email protected]> --
>   |_Date: Mon, 24 May 2010 17:18:19 +0200 ___
>    |
>   |I'm working on a java project and I'm going to use JSch for SFTP
>   |connection. My test class worked fine when I used user/pass
>   |authentication, while it ends with "*Auth fail*" when I try to switch
>   |to user/key authentication.
>   |If I manually connect to the server using OpenSSH client it works, so
> SSH
>   |server should work and accept the key.
>   |I set up a simple logger, from its output it seems JSch skips publickey
>   |method... without errors.
>   |Where am I wrong? Thanks!
>
> Is it possible to check the sever side log?
> I mean that running sshd with debug options,
>  # /usr/sbin/sshd -d -d -d
>
>
> Sincerely,
> --
> Atsuhiko Yamanaka
> JCraft,Inc.
> 1-14-20 HONCHO AOBA-KU,
> SENDAI, MIYAGI 980-0014 Japan.
> Tel +81-22-723-2150
>    +1-415-578-3454
> Skype callto://jcraft/
> Twitter: @ymnk
>
>
------------------------------------------------------------------------------

_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to