Hi,

   +-From: Bradley Wagner <[email protected]> --
   |_Date: Tue, 27 Jul 2010 23:00:44 -0400 _________________
   |
   |I was wondering about Session#setUserInfo. What's the advantage of
   |using UserInfo over to just setting the password field? 

In the batch without any user interactions, there will not be the advantage.

   |                                                        Will using
   |this instruct the server to connect with the password auth method
   |first?

To make it first, 

   JSch ssh = new JSch();
   Session session = ssh.getSession(<username>,<host>,<port>);
   session.setConfig("StrictHostKeyChecking", "no");

   session.setConfig("PreferredAuthentications",
                     "password,gssapi-with-mic,publickey,keyboard-interactive")

   session.setTimeout(15000);
   session.setPassword(<pass>);
   session.connect();

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

------------------------------------------------------------------------------
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://p.sf.net/sfu/dev2dev-palm
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to