public class FileKnownHostsProvider extends StreamKnownHostsProvider
contents, knownHosts
ROLE
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) |
loadKnownHosts
getContents, getHostKeyChecking, setHostKeyChecking
public FileKnownHostsProvider(File file) throws IOException
file
- the file that holds the known hosts, in the openssh formatIOException
public FileKnownHostsProvider() throws IOException
IOException
FileKnownHostsProvider(File)
public void storeKnownHosts(String contents) throws IOException
storeKnownHosts
in interface KnownHostsProvider
storeKnownHosts
in class AbstractKnownHostsProvider
IOException
public void addKnownHost(KnownHostEntry knownHostEntry) throws IOException
addKnownHost
in interface KnownHostsProvider
addKnownHost
in class AbstractKnownHostsProvider
IOException
Copyright © 2003–2022 The Apache Software Foundation. All rights reserved.