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 void
addKey(java.lang.String username, SshPublicKey key)
boolean
containsKey(SshPublicKey key)
static byte[]
create(AuthorizedKeys keys, java.lang.String serverId, java.lang.String hostname, AuthorizedKeysFileSaver saver)
java.util.Map
getAuthorizedKeys()
static AuthorizedKeys
parse(byte[] formatted, java.lang.String serverId, java.lang.String hostname, AuthorizedKeysFileLoader loader)
void
removeKey(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:
RemoteIdentificationException
java.io.IOException
InvalidSshKeyException
-
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:
RemoteIdentificationException
java.io.IOException
InvalidSshKeyException
-
-