|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jcraft.jsch.KnownHosts
public class KnownHosts
Field Summary |
---|
Fields inherited from interface com.jcraft.jsch.HostKeyRepository |
---|
CHANGED, NOT_INCLUDED, OK |
Method Summary | |
---|---|
void |
add(HostKey hostkey,
UserInfo userinfo)
Adds a host key hostkey |
int |
check(String host,
byte[] key)
Checks if host is included with the key . |
HostKey[] |
getHostKey()
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. |
String |
getKnownHostsRepositoryID()
Returns id of this repository. |
void |
remove(String host,
String type)
Removes a host key if there exists mached key with host , type . |
void |
remove(String host,
String type,
byte[] key)
Removes a host key if there exists a matched key with host , type and key . |
protected void |
sync()
|
protected void |
sync(String foo)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public String getKnownHostsRepositoryID()
HostKeyRepository
getKnownHostsRepositoryID
in interface HostKeyRepository
public int check(String host, byte[] key)
HostKeyRepository
host
is included with the key
.
check
in interface HostKeyRepository
HostKeyRepository.NOT_INCLUDED
,
HostKeyRepository.OK
,
HostKeyRepository.CHANGED
public void add(HostKey hostkey, UserInfo userinfo)
HostKeyRepository
hostkey
add
in interface HostKeyRepository
hostkey
- a host key to be addeduserinfo
- a user interface for showing messages or promping inputs.UserInfo
public HostKey[] getHostKey()
HostKeyRepository
getHostKey
in interface HostKeyRepository
HostKeyRepository.getHostKey(String host, String type)
public HostKey[] getHostKey(String host, String type)
HostKeyRepository
getHostKey
in interface HostKeyRepository
host
- a hostname used in searching host keys.
If null
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".
If null
is given, a key type type will not be ignored.public void remove(String host, String type)
HostKeyRepository
host
, type
.
remove
in interface HostKeyRepository
HostKeyRepository.remove(String host, String type, byte[] key)
public void remove(String host, String type, byte[] key)
HostKeyRepository
host
, type
and key
.
remove
in interface HostKeyRepository
protected void sync() throws IOException
IOException
protected void sync(String foo) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |