public class AuthorizedKeyFile extends Object
| Constructor and Description |
|---|
AuthorizedKeyFile() |
AuthorizedKeyFile(String authorized_keys) |
| Modifier and Type | Method and Description |
|---|---|
void |
addKey(SshPublicKey key,
String comment) |
void |
addKey(SshPublicKey key,
String comment,
Option<?>... options) |
String |
getFormattedFile() |
PublicKeyEntry |
getKeyEntry(SshPublicKey key) |
Collection<PublicKeyEntry> |
getKeys() |
boolean |
isAuthorizedKey(SshPublicKey key) |
void |
load(InputStream in) |
static void |
main(String[] args) |
void |
removeKey(PublicKeyEntry entry) |
void |
removeKeys(SshPublicKey... keys) |
void |
setOption(PublicKeyEntry entry,
Option<?> option) |
void |
setOption(SshPublicKey key,
Option<?> option) |
public AuthorizedKeyFile()
public AuthorizedKeyFile(String authorized_keys) throws IOException
IOExceptionpublic void load(InputStream in) throws IOException
IOExceptionpublic boolean isAuthorizedKey(SshPublicKey key)
public PublicKeyEntry getKeyEntry(SshPublicKey key)
public Collection<PublicKeyEntry> getKeys()
public void removeKeys(SshPublicKey... keys)
public void removeKey(PublicKeyEntry entry)
public void addKey(SshPublicKey key, String comment)
public void addKey(SshPublicKey key, String comment, Option<?>... options)
public void setOption(PublicKeyEntry entry, Option<?> option)
public void setOption(SshPublicKey key, Option<?> option)
public String getFormattedFile() throws IOException
IOExceptionpublic static void main(String[] args)
Copyright © 2025. All rights reserved.