Class PublicKeyAuthenticationClient
java.lang.Object
com.sshtools.j2ssh.authentication.SshAuthenticationClient
com.sshtools.j2ssh.authentication.PublicKeyAuthenticationClient
- Version:
- $Revision: 1.21 $
- Author:
- $author$
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new PublicKeyAuthenticationClient object. -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptsKey(AuthenticationProtocolClient authentication, String username, String serviceToStart, SshPublicKey key) voidauthenticate(AuthenticationProtocolClient authentication, String serviceToStart) booleanvoidreset()voidsetKey(SshPrivateKey key) voidsetKeyfile(String privateKeyFile) voidsetPersistableProperties(Properties properties) Methods inherited from class com.sshtools.j2ssh.authentication.SshAuthenticationClient
canPrompt, getAuthenticationPrompt, getUsername, setAuthenticationPrompt, setUsername
-
Field Details
-
key
-
-
Constructor Details
-
PublicKeyAuthenticationClient
public PublicKeyAuthenticationClient()Creates a new PublicKeyAuthenticationClient object.
-
-
Method Details
-
setKey
- Parameters:
key-
-
setKeyfile
-
getKeyfile
-
reset
public void reset()- Specified by:
resetin classSshAuthenticationClient
-
getMethodName
- Specified by:
getMethodNamein classSshAuthenticationClient- Returns:
-
acceptsKey
public boolean acceptsKey(AuthenticationProtocolClient authentication, String username, String serviceToStart, SshPublicKey key) throws IOException - Parameters:
authentication-username-serviceToStart-key-- Returns:
- Throws:
IOException
-
authenticate
public void authenticate(AuthenticationProtocolClient authentication, String serviceToStart) throws IOException, TerminatedStateException - Specified by:
authenticatein classSshAuthenticationClient- Parameters:
authentication-serviceToStart-- Throws:
IOExceptionTerminatedStateExceptionAuthenticationProtocolException
-
getPersistableProperties
- Specified by:
getPersistablePropertiesin classSshAuthenticationClient- Returns:
-
setPersistableProperties
- Specified by:
setPersistablePropertiesin classSshAuthenticationClient- Parameters:
properties-
-
canAuthenticate
public boolean canAuthenticate()- Specified by:
canAuthenticatein classSshAuthenticationClient- Returns:
-