public final class HostKeyHelper extends Object
Modifier and Type | Method and Description |
---|---|
HostKey |
getHostKey(Computer host)
Retrieve the currently trusted host key for the requested computer, or null if
no key is currently trusted.
|
static HostKeyHelper |
getInstance() |
void |
saveHostKey(Computer host,
HostKey hostKey)
Persists an SSH key to disk for the requested host.
|
public static HostKeyHelper getInstance()
public HostKey getHostKey(Computer host) throws IOException
host
- the Computer to retrieve the key for.IOException
- if the host key can not be read from storagepublic void saveHostKey(Computer host, HostKey hostKey) throws IOException
host
- the host the key is being saved forhostKey
- the key to be saved as the trusted key for this hostIOException
- on failure saving the key for the hostCopyright © 2016–2022. All rights reserved.