|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.File | +--jssh.KnownHostsFile
This class provides methods for checking whether a server's public key is in a known_hosts file, and for adding a key to the file.
Field Summary | |
static int |
HOST_KEY_DIFFERS
|
static int |
HOST_KEY_NEW
|
static int |
HOST_KEY_OK
|
Fields inherited from class java.io.File |
pathSeparator, pathSeparatorChar, separator, separatorChar |
Constructor Summary | |
KnownHostsFile(java.lang.String pathname_)
Constructor |
Method Summary | |
void |
add_host_key(java.lang.String server_name_,
java.math.BigInteger modulus_,
java.math.BigInteger exponent_)
Add the server's host key to this known_hosts file. |
int |
check_host_key(java.lang.String server_name_,
java.math.BigInteger received_modulus_,
java.math.BigInteger received_exponent_)
Check that the server's host key is in the known_hosts file. |
Methods inherited from class java.io.File |
canRead, canWrite, compareTo, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURI, toURL |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int HOST_KEY_OK
public static final int HOST_KEY_DIFFERS
public static final int HOST_KEY_NEW
Constructor Detail |
public KnownHostsFile(java.lang.String pathname_)
pathname_
- the filename of the known_hosts file.Method Detail |
public int check_host_key(java.lang.String server_name_, java.math.BigInteger received_modulus_, java.math.BigInteger received_exponent_) throws java.io.IOException
java.io.IOException
public void add_host_key(java.lang.String server_name_, java.math.BigInteger modulus_, java.math.BigInteger exponent_) throws java.io.IOException
server_name_
- the hostname of the SSH server.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |