Hi P.V.R.Kartik,
The answer was to use a known hosts file. JSch will record each host
that is approved by the user in the known hosts file. Apparently before
putting putting up the popup JSch searches the known hosts file and, if
the host is found there, the popup is not displayed.
It would be nice if all the services that use a known-hosts like
solution used the same file (ssh, PuTTy, JSch, etc.). As a user, I
should only have to approve the host one time.
Your solution will also eliminate the popup, but it does so by
eliminating the checking. I prefer the checking (even though I always
answer "yes").
-Sam
________________________________
From: [email protected] [mailto:[email protected]]
Sent: Sunday, November 21, 2010 10:58 PM
To: Quiring, Sam
Cc: [email protected]
Subject: RE: [JSch-users] Establish authenticity of remote host
Hi,
I am also a newbie to jsch. I just want to share my experiene if its
relevant. The problem is familiar, however i can't understand the
'popup' thing. However for the remote host key, please note the code
below, which was suggested in numerous sites ( and i have also used
that). Please ignore this if you have already used this.
Session session = jsch.getSession(user, host, 22);
java.util.Properties props = new Properties();
props.setProperty("StrictHostKeyChecking", "no");
session.setPassword(password);
session.setConfig(props);
session.connect();
Regards,
P.V.R.Kartik
________________________________
From: Quiring, Sam [mailto:[email protected]]
Sent: Friday, November 19, 2010 9:27 PM
To: [email protected]
Subject: [JSch-users] Establish authenticity of remote host
Greetings,
We just brought up Jsch and have it working. Thank you.
One remaining issue is every time we connect to a host we get the popup
with the message "The authenticity of host ... Are you sure you want to
continue connecting? [Yes|No]"
What do we have to do so that a yes answer to this question also saves
the remote host key so that this question will not be asked the next
time we connect with the host?
-Sam
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.
www.wipro.com
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users