com.sshtools.publickey
Class PublicKeySubsystem

java.lang.Object
  extended bycom.maverick.ssh.SubsystemChannel
      extended bycom.sshtools.publickey.PublicKeySubsystem

public class PublicKeySubsystem
extends SubsystemChannel

This class implements version 1 of the public key subsystem.

Author:
Lee David Painter

Constructor Summary
PublicKeySubsystem(Ssh2Session session)
           
 
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 com.maverick.ssh.SubsystemChannel
close, createPacket, isClosed, nextMessage, sendMessage, sendMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PublicKeySubsystem

public PublicKeySubsystem(Ssh2Session session)
                   throws SshException
Method Detail

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:
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 3SP LTD. All Rights Reserved.