public class Ssh2HostbasedAuthentication extends Object implements AuthenticationClient
CANCELLED, COMPLETE, FAILED, FURTHER_AUTHENTICATION_REQUIRED, PUBLIC_KEY_ACCEPTABLE
Constructor and Description |
---|
Ssh2HostbasedAuthentication() |
Modifier and Type | Method and Description |
---|---|
void |
authenticate(AuthenticationProtocol authentication,
String servicename)
Perform the authentication according to the specification.
|
String |
getClientUsername()
Get the user's username on the client computer
|
String |
getMethod()
The SSH authentication method name
|
SshPrivateKey |
getPrivateKey()
Get the private key used for this authentication
|
SshPublicKey |
getPublicKey()
Set the public key used for this authentication
|
String |
getUsername()
Get the username for this authentication attempt.
|
void |
setClientHostname(String clientHostname)
Set the hostname of the client
|
void |
setClientUsername(String clientUsername)
Set the user's username on the client computer
|
void |
setPrivateKey(SshPrivateKey prv)
Set the private key for the authentication attempt
|
void |
setPublicKey(SshPublicKey pub)
Set the public key for the authentication attempt
|
void |
setUsername(String username)
Set the username for this authentication attempt.
|
public void authenticate(AuthenticationProtocol authentication, String servicename) throws SshException, AuthenticationResult
AuthenticationClient
authenticate
in interface AuthenticationClient
AuthenticationResult
SshException
public String getMethod()
SshAuthentication
getMethod
in interface SshAuthentication
public void setClientHostname(String clientHostname)
clientHostname
- public void setUsername(String username)
SshAuthentication
setUsername
in interface SshAuthentication
public String getUsername()
SshAuthentication
getUsername
in interface SshAuthentication
public void setPublicKey(SshPublicKey pub)
pub
- public void setPrivateKey(SshPrivateKey prv)
prv
- public void setClientUsername(String clientUsername)
clientUsername
- public String getClientUsername()
public SshPrivateKey getPrivateKey()
public SshPublicKey getPublicKey()
Copyright © 2024. All rights reserved.