com.sshtools.publickey
Class PublicKeySubsystem
java.lang.Object
com.maverick.ssh.SubsystemChannel
com.sshtools.publickey.PublicKeySubsystem
public class PublicKeySubsystem
- extends SubsystemChannel
This class implements version 1 of the public key subsystem.
- Author:
- Lee David Painter
|
Method Summary |
void |
add(SshPublicKey key,
java.lang.String comment)
Add a public key to the users list of acceptable keys. |
void |
associateCommand(SshPublicKey key,
java.lang.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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PublicKeySubsystem
public PublicKeySubsystem(Ssh2Session session)
throws SshException
- Throws:
SshException
add
public void add(SshPublicKey key,
java.lang.String comment)
throws SshException,
PublicKeySubsystemException
- Add a public key to the users list of acceptable keys.
- Parameters:
key - comment -
- Throws:
SshException
PublicKeyStatusException
PublicKeySubsystemException
remove
public void remove(SshPublicKey key)
throws SshException,
PublicKeySubsystemException
- Remove a public key from the users list of acceptable keys.
- Parameters:
key -
- Throws:
SshException
PublicKeyStatusException
PublicKeySubsystemException
list
public SshPublicKey[] list()
throws SshException,
PublicKeySubsystemException
- List all of the users acceptable keys.
- Returns:
- SshPublicKey[]
- Throws:
SshException
PublicKeySubsystemException
associateCommand
public void associateCommand(SshPublicKey key,
java.lang.String command)
throws SshException,
PublicKeySubsystemException
- Associate a command with an accepted public key. The request will fail
if the public key is not currently in the users acceptable list. Also
some server implementations may choose not to support this feature.
- Parameters:
key - command -
- Throws:
SshException
PublicKeyStatusException
PublicKeySubsystemException
Copyright © 2003-2008 SSHTools LTD. All Rights Reserved.