Authenticate the user on the remote host.
To authenticate the user, create an SshAuthenticationClient
instance and configure it with the authentication details.
PasswordAuthenticationClient pwd = new PasswordAuthenticationClient(); pwd.setUsername("root"); pwd.setPassword("xxxxxxxxx"); int result = ssh.authenticate(pwd);
The method returns a result value will one of the public static values defined in AuthenticationProtocolState
. These are
COMPLETED - The authentication succeeded.
PARTIAL - The authentication succeeded but a further authentication method is required.
FAILED - The authentication failed.
CANCELLED - The user cancelled authentication (can only be returned when the user is prompted for information.
|
|