Class StaticServerKeyVerifier

    • Field Detail

      • acceptance

        private final boolean acceptance
    • Constructor Detail

      • StaticServerKeyVerifier

        protected StaticServerKeyVerifier​(boolean acceptance)
    • Method Detail

      • isAccepted

        public final boolean isAccepted()
      • verifyServerKey

        public final 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
      • handleAcceptance

        protected void handleAcceptance​(ClientSession sshClientSession,
                                        java.net.SocketAddress remoteAddress,
                                        java.security.PublicKey serverKey)
      • handleRejection

        protected void handleRejection​(ClientSession sshClientSession,
                                       java.net.SocketAddress remoteAddress,
                                       java.security.PublicKey serverKey)