com.sshtools.j2ssh.authentication
Class PublicKeyAuthenticationClient

java.lang.Object
  extended by com.sshtools.j2ssh.authentication.SshAuthenticationClient
      extended by com.sshtools.j2ssh.authentication.PublicKeyAuthenticationClient

public class PublicKeyAuthenticationClient
extends SshAuthenticationClient

Version:
$Revision: 1.21 $
Author:
$author$

Field Summary
protected  SshPrivateKey key
           
 
Constructor Summary
PublicKeyAuthenticationClient()
          Creates a new PublicKeyAuthenticationClient object.
 
Method Summary
 boolean acceptsKey(AuthenticationProtocolClient authentication, java.lang.String username, java.lang.String serviceToStart, SshPublicKey key)
           
 void authenticate(AuthenticationProtocolClient authentication, java.lang.String serviceToStart)
           
 boolean canAuthenticate()
           
 java.lang.String getKeyfile()
           
 java.lang.String getMethodName()
           
 java.util.Properties getPersistableProperties()
           
 void reset()
           
 void setKey(SshPrivateKey key)
           
 void setKeyfile(java.lang.String privateKeyFile)
           
 void setPersistableProperties(java.util.Properties properties)
           
 
Methods inherited from class com.sshtools.j2ssh.authentication.SshAuthenticationClient
canPrompt, getAuthenticationPrompt, getUsername, setAuthenticationPrompt, setUsername
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

protected SshPrivateKey key
Constructor Detail

PublicKeyAuthenticationClient

public PublicKeyAuthenticationClient()
Creates a new PublicKeyAuthenticationClient object.

Method Detail

setKey

public void setKey(SshPrivateKey key)
Parameters:
key -

setKeyfile

public void setKeyfile(java.lang.String privateKeyFile)

getKeyfile

public java.lang.String getKeyfile()

reset

public void reset()
Specified by:
reset in class SshAuthenticationClient

getMethodName

public java.lang.String getMethodName()
Specified by:
getMethodName in class SshAuthenticationClient
Returns:

acceptsKey

public boolean acceptsKey(AuthenticationProtocolClient authentication,
                          java.lang.String username,
                          java.lang.String serviceToStart,
                          SshPublicKey key)
                   throws java.io.IOException
Parameters:
authentication -
username -
serviceToStart -
key -
Returns:
Throws:
java.io.IOException

authenticate

public void authenticate(AuthenticationProtocolClient authentication,
                         java.lang.String serviceToStart)
                  throws java.io.IOException,
                         TerminatedStateException
Specified by:
authenticate in class SshAuthenticationClient
Parameters:
authentication -
serviceToStart -
Throws:
java.io.IOException
TerminatedStateException
AuthenticationProtocolException

getPersistableProperties

public java.util.Properties getPersistableProperties()
Specified by:
getPersistableProperties in class SshAuthenticationClient
Returns:

setPersistableProperties

public void setPersistableProperties(java.util.Properties properties)
Specified by:
setPersistableProperties in class SshAuthenticationClient
Parameters:
properties -

canAuthenticate

public boolean canAuthenticate()
Specified by:
canAuthenticate in class SshAuthenticationClient
Returns:


Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.