public interface HostKeyRepository
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a host keyhostkey
int
Checks ifhost
is included with thekey
.HostKey[]
Retuns a list for host keys managed in this repository.HostKey[]
getHostKey
(String host, String type) Retuns a list for host keys managed in this repository.Returns id of this repository.void
Removes a host key if there exists mached key withhost
,type
.void
Removes a host key if there exists a matched key withhost
,type
andkey
.
-
Field Details
-
OK
static final int OK- See Also:
-
NOT_INCLUDED
static final int NOT_INCLUDED- See Also:
-
CHANGED
static final int CHANGED- See Also:
-
-
Method Details
-
check
Checks ifhost
is included with thekey
.- Returns:
- #NOT_INCLUDED, #OK or #CHANGED
- See Also:
-
add
Adds a host keyhostkey
- Parameters:
hostkey
- a host key to be addedui
- a user interface for showing messages or promping inputs.- See Also:
-
remove
Removes a host key if there exists mached key withhost
,type
.- See Also:
-
remove
Removes a host key if there exists a matched key withhost
,type
andkey
. -
getKnownHostsRepositoryID
String getKnownHostsRepositoryID()Returns id of this repository.- Returns:
- identity in String
-
getHostKey
HostKey[] getHostKey()Retuns a list for host keys managed in this repository.- See Also:
-
getHostKey
Retuns a list for host keys managed in this repository.- Parameters:
host
- a hostname used in searching host keys. Ifnull
is given, every host key will be listed.type
- a key type used in searching host keys, and it should be "ssh-dss" or "ssh-rsa". Ifnull
is given, a key type type will not be ignored.
-