public class

AuthPublickey

extends KeyedAuthMethod
java.lang.Object
   ↳ net.schmizz.sshj.userauth.method.AbstractAuthMethod
     ↳ net.schmizz.sshj.userauth.method.KeyedAuthMethod
       ↳ net.schmizz.sshj.userauth.method.AuthPublickey

Class Overview

Implements the "publickey" SSH authentication method.

Requesteing authentication with this method first sends a "feeler" request with just the public key, and if the server responds with SSH_MSG_USERAUTH_PK_OK indicating that the key is acceptable, it proceeds to send a request signed with the private key. Therefore, private keys are not requested from the associated KeyProvider unless needed.

Summary

[Expand]
Inherited Fields
From class net.schmizz.sshj.userauth.method.KeyedAuthMethod
From class net.schmizz.sshj.userauth.method.AbstractAuthMethod
Public Constructors
AuthPublickey(KeyProvider kProv)
Initialize this method with the provider for public and private key.
Public Methods
void handle(Message cmd, SSHPacket buf)
Internal use.
Protected Methods
SSHPacket buildReq()
Builds a feeler request (sans signature).
[Expand]
Inherited Methods
From class net.schmizz.sshj.userauth.method.KeyedAuthMethod
From class net.schmizz.sshj.userauth.method.AbstractAuthMethod
From class java.lang.Object
From interface net.schmizz.sshj.common.SSHPacketHandler
From interface net.schmizz.sshj.userauth.method.AuthMethod

Public Constructors

public AuthPublickey (KeyProvider kProv)

Initialize this method with the provider for public and private key.

Parameters
kProv

Public Methods

public void handle (Message cmd, SSHPacket buf)

Internal use.

Parameters
cmd The SSH message identifier
buf SSHPacket containing rest of the request

Protected Methods

protected SSHPacket buildReq ()

Builds a feeler request (sans signature).