public HostKey getHostKey ( Computer host ) throws IOException { HostKey key = cache . get ( host ) ; if ( null == key ) { File hostKeyFile = getSshHostKeyFile ( host . getNode ( ) ) ; if ( hostKeyFile . exists ( ) ) { XmlFile xmlHostKeyFile = new XmlFile ( hostKeyFile ) ; key = ( HostKey ) xmlHostKeyFile . read ( ) ; } else { key = null ; } cache . put ( host , key ) ; } return key ; }
Retrieve the currently trusted host key for the requested computer or null if no key is currently trusted .