I see, you don't use the UI.  Interesting.  I, instead, created my own
implementation of UserInfo, but then I had to make the promptPassword method
return true and of course, the getPassword member return the password.  This
worked as well but yours is so much simpler. Thanks.

  _____  

From: Macias, Horaci (Horaci) [mailto:hmac...@avaya.com] 
Sent: Friday, May 22, 2009 9:59 AM
To: COHEN, STEVEN M (ATTSI); jsch-users@lists.sourceforge.net
Subject: RE: [JSch-users] JSch configuration


lol, it looks like you're facing the same issues I had a couple of days ago.
Try the following:
session = jsch.getSession(user, host, port);

session.setPassword(password);

session.setConfig("StrictHostKeyChecking", "no");

and make sure you remove/comment the 

session.setUserInfo(ui); 

I started with the Shell example but it looks like the sftp is quite close
to that too.

hope this helps,

Horaci


  _____  

From: COHEN, STEVEN M (ATTSI) [mailto:sc1...@att.com] 
Sent: viernes, 22 de mayo de 2009 16:56
To: Macias, Horaci (Horaci); jsch-users@lists.sourceforge.net
Subject: RE: [JSch-users] JSch configuration


Thanks.  Yeah, I set it to "off" and that seemed to work, only leading me to
the next roadblock.
 
When using the sftp.java sample that is included I was able to connect to my
host without any difficulty.  Host uses simple password authentication, no
keys.  I'm now writing a non-interactive client that just connects and I'm
getting an Auth cancel exception.  I am supplying the correct username and
password.  What other configs do I need to change to achieve the connection?

  _____  

From: Macias, Horaci (Horaci) [mailto:hmac...@avaya.com] 
Sent: Friday, May 22, 2009 9:47 AM
To: COHEN, STEVEN M (ATTSI); jsch-users@lists.sourceforge.net
Subject: RE: [JSch-users] JSch configuration


Hi Steve,
 
I'm by no means a JSch expert but I had a similar request and I just solved
it by using
session.setConfig("StrictHostKeyChecking", "no");

before your session.connect().

This seems to work for me.

hope this helps,

Horaci


  _____  

From: COHEN, STEVEN M (ATTSI) [mailto:sc1...@att.com] 
Sent: viernes, 22 de mayo de 2009 16:35
To: jsch-users@lists.sourceforge.net
Subject: [JSch-users] JSch configuration




Looking at the source code, it appears that the JSch configuration is a
simple Hashtable with a large number of keys defined.  I don't find any
documentation listing what may be acceptable values for those keys.

In particular I am interesting in turning off the StrictHostKeyChecking,
which is by default given a value of "ask".  My application wants to simply
accept the key of the (only) sftp host it will be connecting to without any
user interaction needed.

How may this be implemented most easily? 

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to