Package com.sshtools.common.automate
Class AuthorizedKeys
java.lang.Object
com.sshtools.common.automate.AuthorizedKeys
- Version:
- $Revision: 1.15 $
- Author:
- $author$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddKey(String username, SshPublicKey key) booleancontainsKey(SshPublicKey key) static byte[]create(AuthorizedKeys keys, String serverId, String hostname, AuthorizedKeysFileSaver saver) static AuthorizedKeysparse(byte[] formatted, String serverId, String hostname, AuthorizedKeysFileLoader loader) voidremoveKey(SshPublicKey key)
-
Constructor Details
-
AuthorizedKeys
public AuthorizedKeys()
-
-
Method Details
-
getAuthorizedKeys
- Returns:
-
addKey
- Parameters:
username-key-
-
removeKey
- Parameters:
key-
-
containsKey
- Parameters:
key-- Returns:
-
parse
public static AuthorizedKeys parse(byte[] formatted, String serverId, String hostname, AuthorizedKeysFileLoader loader) throws RemoteIdentificationException, IOException, InvalidSshKeyException - Parameters:
formatted-serverId-loader-- Returns:
- Throws:
RemoteIdentificationExceptionIOExceptionInvalidSshKeyException
-
create
public static byte[] create(AuthorizedKeys keys, String serverId, String hostname, AuthorizedKeysFileSaver saver) throws RemoteIdentificationException, IOException, InvalidSshKeyException - Parameters:
keys-serverId-saver-- Returns:
- Throws:
RemoteIdentificationExceptionIOExceptionInvalidSshKeyException
-