Package com.sshtools.common.automate
Class AuthorizedKeys
- java.lang.Object
-
- com.sshtools.common.automate.AuthorizedKeys
-
public class AuthorizedKeys extends java.lang.Object- Version:
- $Revision: 1.15 $
- Author:
- $author$
-
-
Constructor Summary
Constructors Constructor Description AuthorizedKeys()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddKey(java.lang.String username, SshPublicKey key)booleancontainsKey(SshPublicKey key)static byte[]create(AuthorizedKeys keys, java.lang.String serverId, java.lang.String hostname, AuthorizedKeysFileSaver saver)java.util.MapgetAuthorizedKeys()static AuthorizedKeysparse(byte[] formatted, java.lang.String serverId, java.lang.String hostname, AuthorizedKeysFileLoader loader)voidremoveKey(SshPublicKey key)
-
-
-
Method Detail
-
getAuthorizedKeys
public java.util.Map getAuthorizedKeys()
- Returns:
-
addKey
public void addKey(java.lang.String username, SshPublicKey key)- Parameters:
username-key-
-
removeKey
public void removeKey(SshPublicKey key)
- Parameters:
key-
-
containsKey
public boolean containsKey(SshPublicKey key)
- Parameters:
key-- Returns:
-
parse
public static AuthorizedKeys parse(byte[] formatted, java.lang.String serverId, java.lang.String hostname, AuthorizedKeysFileLoader loader) throws RemoteIdentificationException, java.io.IOException, InvalidSshKeyException
- Parameters:
formatted-serverId-loader-- Returns:
- Throws:
RemoteIdentificationExceptionjava.io.IOExceptionInvalidSshKeyException
-
create
public static byte[] create(AuthorizedKeys keys, java.lang.String serverId, java.lang.String hostname, AuthorizedKeysFileSaver saver) throws RemoteIdentificationException, java.io.IOException, InvalidSshKeyException
- Parameters:
keys-serverId-saver-- Returns:
- Throws:
RemoteIdentificationExceptionjava.io.IOExceptionInvalidSshKeyException
-
-