Class NonVerifyingKeyVerificationStrategy

  • All Implemented Interfaces:
    Describable<SshHostKeyVerificationStrategy>

    public class NonVerifyingKeyVerificationStrategy
    extends SshHostKeyVerificationStrategy
    A verifier that performs no action on the host key, thereby allowing all connections. To make it clear that no verification is being performed, a message is printed to connection logs to indicate the key is not being checked and a man-in-the-middle attach may therefore be possible against this connection.
    Since:
    1.13
    Author:
    Michael Clarke
    • Constructor Detail

      • NonVerifyingKeyVerificationStrategy

        @DataBoundConstructor
        public NonVerifyingKeyVerificationStrategy()
    • Method Detail

      • verify

        public boolean verify​(SlaveComputer computer,
                              HostKey hostKey,
                              TaskListener listener)
        Description copied from class: SshHostKeyVerificationStrategy
        Check if the given key is valid for the host identifier.
        Specified by:
        verify in class SshHostKeyVerificationStrategy
        Parameters:
        computer - the computer this connection is being initiated for
        hostKey - the key that was transmitted by the remote host for the current connection. This is the key that should be checked to see if we trust it by the current verifier.
        listener - the connection listener to write any output log to
        Returns:
        whether the provided HostKey is trusted and the current connection can therefore continue.