I'm trying to authenticate a signature that clients generate from their private key and send to the server.
The only authenticator I could find in the library that sounded appropriate was the PublickeyAuthenticator
. Please correct me if this is the wrong class to do this.
I currently have:
this.sshServer.setPublickeyAuthenticator(new PublickeyAuthenticator() {
@Override
public boolean authenticate(String username, PublicKey key, ServerSession session) {
if (username.equals("client")) {
//if signature == valid??
return true;
}
}
});
Does anyone know if mina supports signature verification and if so, how can it be implemented?
My understanding is that I'd first have to assign/add the user public key to the server. If the client has provided a id_rsa.pub
file, how can I go about adding this file to the server as the public key?