The
KnownHosts
class is a handy tool to verify received server hostkeys based on the information in
known_hosts
files (the ones used by OpenSSH).
It offers basically an in-memory database for known_hosts entries, as well as some helper functions. Entries from a known_hosts
file can be loaded at construction time. It is also possible to add more keys later (e.g., one can parse different known_hosts files). It is a thread safe implementation, therefore, you need only to instantiate one KnownHosts
for your whole application.
@author Christian Plattner, plattner@inf.ethz.ch
@version $Id: KnownHosts.java,v 1.5 2006/07/30 21:59:29 cplattne Exp $