|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.maverick.ssh2.Ssh2HostbasedAuthentication
Provides hostbased authentication for the SSH2 protocol. Hostbased authentication allows a user to connect from a trusted client by providing the clients public key and their local/remote usernames. The server then allows access if the client can be verified through a combination of several different configuration files which include /etc/hosts.equiv /etc/ssh/ssh_known_hosts ~/.ssh/known_hosts ~/.rhosts ~./shosts.
Field Summary |
Fields inherited from interface com.maverick.ssh.SshAuthentication |
CANCELLED, COMPLETE, FAILED, FURTHER_AUTHENTICATION_REQUIRED, PUBLIC_KEY_ACCEPTABLE |
Constructor Summary | |
Ssh2HostbasedAuthentication()
|
Method Summary | |
void |
authenticate(AuthenticationProtocol authentication,
java.lang.String servicename)
Perform the authentication according to the specification. |
java.lang.String |
getClientUsername()
Get the user's username on the client computer |
java.lang.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 |
java.lang.String |
getUsername()
Get the username for this authentication attempt. |
void |
setClientHostname(java.lang.String clientHostname)
Set the hostname of the client |
void |
setClientUsername(java.lang.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(java.lang.String username)
Set the username for this authentication attempt. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Ssh2HostbasedAuthentication()
Method Detail |
public void authenticate(AuthenticationProtocol authentication, java.lang.String servicename) throws SshException, com.maverick.ssh2.AuthenticationResult
AuthenticationClient
authenticate
in interface AuthenticationClient
authentication
- servicename
-
SshException
com.maverick.ssh2.AuthenticationResult
public java.lang.String getMethod()
SshAuthentication
getMethod
in interface SshAuthentication
public void setClientHostname(java.lang.String clientHostname)
clientHostname
- public void setUsername(java.lang.String username)
SshAuthentication
setUsername
in interface SshAuthentication
username
- public java.lang.String getUsername()
SshAuthentication
getUsername
in interface SshAuthentication
public void setPublicKey(SshPublicKey pub)
pub
- public void setPrivateKey(SshPrivateKey prv)
prv
- public void setClientUsername(java.lang.String clientUsername)
clientUsername
- public java.lang.String getClientUsername()
public SshPrivateKey getPrivateKey()
public SshPublicKey getPublicKey()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |