com.maverick.ssh2
Class Ssh2PublicKeyAuthentication

java.lang.Object
  extended bycom.maverick.ssh.PublicKeyAuthentication
      extended bycom.maverick.ssh2.Ssh2PublicKeyAuthentication
All Implemented Interfaces:
AuthenticationClient, SshAuthentication

public class Ssh2PublicKeyAuthentication
extends PublicKeyAuthentication
implements AuthenticationClient

SSH2 public key authentication providing additional SSH2 public key authentication features. This implementation extends basic public key authentication to provide the ability to pre-check whether a public key is acceptable to the server. Use exactly the same as

Field Summary
 
Fields inherited from interface com.maverick.ssh.SshAuthentication
CANCELLED, COMPLETE, FAILED, FURTHER_AUTHENTICATION_REQUIRED, PUBLIC_KEY_ACCEPTABLE
 
Constructor Summary
Ssh2PublicKeyAuthentication()
           
 
Method Summary
 void authenticate(AuthenticationProtocol authentication, java.lang.String servicename)
          Perform the authentication according to the specification.
 void setSignatureGenerator(SignatureGenerator generator)
          Set the signature generator for this authentication attempt.
 
Methods inherited from class com.maverick.ssh.PublicKeyAuthentication
getMethod, getPrivateKey, getPublicKey, getUsername, isAuthenticating, setAuthenticating, setPrivateKey, setPublicKey, setUsername
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.maverick.ssh.SshAuthentication
getMethod, getUsername, setUsername
 

Constructor Detail

Ssh2PublicKeyAuthentication

public Ssh2PublicKeyAuthentication()
Method Detail

authenticate

public void authenticate(AuthenticationProtocol authentication,
                         java.lang.String servicename)
                  throws SshException,
                         com.maverick.ssh2.AuthenticationResult
Description copied from interface: AuthenticationClient
Perform the authentication according to the specification. The expected result of this method is for the caller to catch an AuthenticationResult. If the method returns without throwing this then the caller will attempt to read the next message available expecting it to be either a SSH_MSG_USERAUTH_SUCCESS or SSH_MSG_USERAUTH_FAILURE.

Specified by:
authenticate in interface AuthenticationClient
Parameters:
authentication -
servicename -
Throws:
SshException
com.maverick.ssh2.AuthenticationResult

setSignatureGenerator

public void setSignatureGenerator(SignatureGenerator generator)
Set the signature generator for this authentication attempt. This will overide any previous configured private key.

Parameters:
generator -


Copyright © 2003 3SP LTD. All Rights Reserved.