public class AuthPublickey extends KeyedAuthMethod
"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.kProv
log, params
Constructor and Description |
---|
AuthPublickey(KeyProvider kProv)
Initialize this method with the provider for public and private key.
|
Modifier and Type | Method and Description |
---|---|
protected SSHPacket |
buildReq()
Builds a feeler request (sans signature).
|
void |
handle(Message cmd,
SSHPacket buf)
Internal use.
|
putPubKey, putSig
getName, init, makeAccountResource, request, shouldRetry
public AuthPublickey(KeyProvider kProv)
public void handle(Message cmd, SSHPacket buf) throws UserAuthException, TransportException
handle
in interface SSHPacketHandler
handle
in class AbstractAuthMethod
cmd
- the SSH message identifier
buf
- SSHPacket
containing rest of the requestUserAuthException
TransportException
protected SSHPacket buildReq() throws UserAuthException
buildReq
in class AbstractAuthMethod
UserAuthException