SSH2 Validation Against Known Hosts

David Basten dbasten1 at hotmail.com
Mon Nov 13 20:18:02 MET 2006


Can the SSH2 connection test against known_hosts?  I see some of the logic 
in the SSH version, but not SSH2.

Based on the "Settings.txt" file, I updated RunRemoteCommand.java to do the 
following:

            SSH2Preferences prefs = new SSH2Preferences();

            // This shows how to force certain properties
            prefs.setPreference("sshhome", "c:\\xyz\\known_hosts");
            prefs.setPreference("strict-hostid", "true");

	Socket serverSocket = new Socket(server, port);
	SSH2Transport transport = new SSH2Transport(serverSocket, prefs, 
createSecureRandom());

However, even with these settings my command works without error in two 
different conditions: a) invalid host setting and b) missing host setting.

I appreciate any insight you can give me.

Regards,
David Basten

_________________________________________________________________
Stay in touch with old friends and meet new ones with Windows Live Spaces 
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us



More information about the Mindterm-users mailing list