On Tue, Jul 27, 2010 at 9:57 PM, Atsuhiko Yamanaka <[email protected]> wrote:
> Hi,
>
>   +-From: Bradley Wagner <[email protected]> --
>   |_Date: Tue, 27 Jul 2010 17:13:22 -0400 _________________
>   |
>   |Is there a way to tell JSch to tell the server to use password
>   |auth from the start rather than trying different auth methods?
>
>   |I have the following code:
>   |
>   |JSch ssh = new JSch();
>   |Session session = ssh.getSession(<username>,<host>,<port>);
>   |session.setConfig("StrictHostKeyChecking", "no");
>
>    session.setConfig("PreferredAuthentications", "password");
>
>   |session.setTimeout(15000);
>   |session.setPassword(<pass>);
>   |session.connect();
>
>   |which is resulting in "Auth fail".  I confirmed that password
>   |authentication is enabled on the remote machine.
>
> But, it seems that remote sshd has claimed that it does know about
> "password" auth method,
>
>   ...
>   |debug1: userauth-request for user cmspol service ssh-connection method 
> password
>   |debug1: attempt 3 initial attempt 1 failures 3 initial failures 1
>   |debug2: Unrecognized authentication method name: password
>            ^^^^^^^^^^^^
>   |Failed password for cmspol from 128.200.168.182 port 56182 ssh2
>   |Received disconnect from 128.200.168.182: 3:
>   |com.jcraft.jsch.JSchException: Auth
>   |fail
>   ...

Yes, I noticed this too. We *think* this is because the auth failed on
3 earlier occasions but I agree this message is suspicious. We've
verified that the

PasswordAuthentication yes

option is enabled in the sshd_config.

> I guess that you had logged-in with keyboard-interactive auth method
> with other ssh clients.  If so and you don't want to implement
> the com.jcraft.jsh.UIKeyboardInteractive interface , try jsch-0.1.43 .

How would this affect authentication being done with JSch? Also, what
has changed in jsch-0.1.43 to affect this?

>
> 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
>

Thanks,
Bradley

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to