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 TypeMethodDescriptionvoid
addKey
(String username, SshPublicKey key) boolean
containsKey
(SshPublicKey key) static byte[]
create
(AuthorizedKeys keys, String serverId, String hostname, AuthorizedKeysFileSaver saver) static AuthorizedKeys
parse
(byte[] formatted, String serverId, String hostname, AuthorizedKeysFileLoader loader) void
removeKey
(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:
RemoteIdentificationException
IOException
InvalidSshKeyException
-
create
public static byte[] create(AuthorizedKeys keys, String serverId, String hostname, AuthorizedKeysFileSaver saver) throws RemoteIdentificationException, IOException, InvalidSshKeyException - Parameters:
keys
-serverId
-saver
-- Returns:
- Throws:
RemoteIdentificationException
IOException
InvalidSshKeyException
-