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 TypeMethodDescriptionboolean
acceptsKey
(AuthenticationProtocolClient authentication, String username, String serviceToStart, SshPublicKey key) void
authenticate
(AuthenticationProtocolClient authentication, String serviceToStart) boolean
void
reset()
void
setKey
(SshPrivateKey key) void
setKeyfile
(String privateKeyFile) void
setPersistableProperties
(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:
reset
in classSshAuthenticationClient
-
getMethodName
- Specified by:
getMethodName
in 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:
authenticate
in classSshAuthenticationClient
- Parameters:
authentication
-serviceToStart
-- Throws:
IOException
TerminatedStateException
AuthenticationProtocolException
-
getPersistableProperties
- Specified by:
getPersistableProperties
in classSshAuthenticationClient
- Returns:
-
setPersistableProperties
- Specified by:
setPersistableProperties
in classSshAuthenticationClient
- Parameters:
properties
-
-
canAuthenticate
public boolean canAuthenticate()- Specified by:
canAuthenticate
in classSshAuthenticationClient
- Returns:
-