Class StaticServerKeyVerifier

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean acceptance  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected StaticServerKeyVerifier​(boolean acceptance)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void handleAcceptance​(ClientSession sshClientSession, java.net.SocketAddress remoteAddress, java.security.PublicKey serverKey)  
      protected void handleRejection​(ClientSession sshClientSession, java.net.SocketAddress remoteAddress, java.security.PublicKey serverKey)  
      boolean isAccepted()  
      boolean verifyServerKey​(ClientSession sshClientSession, java.net.SocketAddress remoteAddress, java.security.PublicKey serverKey)
      Verify that the server key provided is really the one of the host.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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)