public class PublicKeyAuthenticationClient extends SshAuthenticationClient
Modifier and Type | Field and Description |
---|---|
protected SshPrivateKey |
key |
Constructor and Description |
---|
PublicKeyAuthenticationClient()
Creates a new PublicKeyAuthenticationClient object.
|
Modifier and Type | Method and Description |
---|---|
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) |
canPrompt, getAuthenticationPrompt, getUsername, setAuthenticationPrompt, setUsername
protected SshPrivateKey key
public PublicKeyAuthenticationClient()
public void setKey(SshPrivateKey key)
key
- public void setKeyfile(java.lang.String privateKeyFile)
public java.lang.String getKeyfile()
public void reset()
reset
in class SshAuthenticationClient
public java.lang.String getMethodName()
getMethodName
in class SshAuthenticationClient
public boolean acceptsKey(AuthenticationProtocolClient authentication, java.lang.String username, java.lang.String serviceToStart, SshPublicKey key) throws java.io.IOException
authentication
- username
- serviceToStart
- key
- java.io.IOException
public void authenticate(AuthenticationProtocolClient authentication, java.lang.String serviceToStart) throws java.io.IOException, TerminatedStateException
authenticate
in class SshAuthenticationClient
authentication
- serviceToStart
- java.io.IOException
TerminatedStateException
AuthenticationProtocolException
public java.util.Properties getPersistableProperties()
getPersistableProperties
in class SshAuthenticationClient
public void setPersistableProperties(java.util.Properties properties)
setPersistableProperties
in class SshAuthenticationClient
properties
- public boolean canAuthenticate()
canAuthenticate
in class SshAuthenticationClient
Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.