public class PublicKeySubsystem extends SubsystemChannel
channel
Constructor and Description |
---|
PublicKeySubsystem(Ssh2Session session) |
PublicKeySubsystem(Ssh2Session session,
int timeout) |
Modifier and Type | Method and Description |
---|---|
void |
add(SshPublicKey key,
String comment)
Add a public key to the users list of acceptable keys.
|
void |
associateCommand(SshPublicKey key,
String command)
Associate a command with an accepted public key.
|
SshPublicKey[] |
list()
List all of the users acceptable keys.
|
void |
remove(SshPublicKey key)
Remove a public key from the users list of acceptable keys.
|
close, createPacket, debug, debug, isClosed, nextMessage, sendMessage
public PublicKeySubsystem(Ssh2Session session) throws SshException
SshException
public PublicKeySubsystem(Ssh2Session session, int timeout) throws SshException
SshException
public void add(SshPublicKey key, String comment) throws SshException, PublicKeySubsystemException
key
- comment
- SshException
PublicKeyStatusException
PublicKeySubsystemException
public void remove(SshPublicKey key) throws SshException, PublicKeySubsystemException
key
- SshException
PublicKeyStatusException
PublicKeySubsystemException
public SshPublicKey[] list() throws SshException, PublicKeySubsystemException
SshException
PublicKeySubsystemException
public void associateCommand(SshPublicKey key, String command) throws SshException, PublicKeySubsystemException
key
- command
- SshException
PublicKeyStatusException
PublicKeySubsystemException
Copyright © 2024. All rights reserved.