com.sshtools.j2ssh.authentication

Class 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, String username, String serviceToStart, SshPublicKey key)
void
authenticate(AuthenticationProtocolClient authentication, String serviceToStart)
boolean
canAuthenticate()
String
getKeyfile()
String
getMethodName()
Properties
getPersistableProperties()
void
reset()
void
setKey(SshPrivateKey key)
void
setKeyfile(String privateKeyFile)
void
setPersistableProperties(Properties properties)

Methods inherited from class com.sshtools.j2ssh.authentication.SshAuthenticationClient

authenticate, canAuthenticate, canPrompt, getAuthenticationPrompt, getMethodName, getPersistableProperties, getUsername, reset, setAuthenticationPrompt, setPersistableProperties, setUsername

Field Details

key

protected SshPrivateKey key

Constructor Details

PublicKeyAuthenticationClient

public PublicKeyAuthenticationClient()
Creates a new PublicKeyAuthenticationClient object.

Method Details

acceptsKey

public boolean acceptsKey(AuthenticationProtocolClient authentication,
                          String username,
                          String serviceToStart,
                          SshPublicKey key)
            throws IOException
Parameters:
authentication -
username -
serviceToStart -
key -
Returns:

authenticate

public void authenticate(AuthenticationProtocolClient authentication,
                         String serviceToStart)
            throws IOException,
                   TerminatedStateException
Overrides:
authenticate in interface SshAuthenticationClient
Parameters:
authentication -
serviceToStart -

canAuthenticate

public boolean canAuthenticate()
Overrides:
canAuthenticate in interface SshAuthenticationClient
Returns:

getKeyfile

public String getKeyfile()

getMethodName

public String getMethodName()
Overrides:
getMethodName in interface SshAuthenticationClient
Returns:

getPersistableProperties

public Properties getPersistableProperties()
Overrides:
getPersistableProperties in interface SshAuthenticationClient

reset

public void reset()
Overrides:
reset in interface SshAuthenticationClient

setKey

public void setKey(SshPrivateKey key)
Parameters:
key -

setKeyfile

public void setKeyfile(String privateKeyFile)

setPersistableProperties

public void setPersistableProperties(Properties properties)
Overrides:
setPersistableProperties in interface SshAuthenticationClient
Parameters:
properties -

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