public class FileKnownHostsProvider extends StreamKnownHostsProvider
contents, knownHostsROLE| Constructor and Description | 
|---|
| FileKnownHostsProvider()Creates a FileKnownHostsProvider using as file openssh knwon_host | 
| FileKnownHostsProvider(File file)Creates the FileKnownHostsProvider. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addKnownHost(KnownHostEntry knownHostEntry) | 
| File | getFile() | 
| void | storeKnownHosts(String contents) | 
loadKnownHostsgetContents, getHostKeyChecking, setHostKeyCheckingpublic FileKnownHostsProvider(File file) throws IOException
file - the file that holds the known hosts, in the openssh formatIOExceptionpublic FileKnownHostsProvider() throws IOException
IOExceptionFileKnownHostsProvider(File)public void storeKnownHosts(String contents) throws IOException
storeKnownHosts in interface KnownHostsProviderstoreKnownHosts in class AbstractKnownHostsProviderIOExceptionpublic void addKnownHost(KnownHostEntry knownHostEntry) throws IOException
addKnownHost in interface KnownHostsProvideraddKnownHost in class AbstractKnownHostsProviderIOExceptionCopyright © 2003–2022 The Apache Software Foundation. All rights reserved.