Class RequiredServerKeyVerifier

    • Field Detail

      • requiredKey

        private final java.security.PublicKey requiredKey
    • Constructor Detail

      • RequiredServerKeyVerifier

        public RequiredServerKeyVerifier​(java.security.PublicKey requiredKey)
    • Method Detail

      • getRequiredKey

        public final java.security.PublicKey getRequiredKey()
      • verifyServerKey

        public boolean verifyServerKey​(ClientSession sshClientSession,
                                       java.net.SocketAddress remoteAddress,
                                       java.security.PublicKey serverKey)
        Description copied from interface: ServerKeyVerifier
        Verify that the server key provided is really the one of the host.
        Specified by:
        verifyServerKey in interface ServerKeyVerifier
        Parameters:
        sshClientSession - the current ClientSession
        remoteAddress - the host's SocketAddress
        serverKey - the presented server PublicKey
        Returns:
        true if the key is accepted for the host