Class ManuallyTrustedKeyVerificationStrategy
java.lang.Object
hudson.plugins.sshslaves.verifiers.SshHostKeyVerificationStrategy
hudson.plugins.sshslaves.verifiers.ManuallyTrustedKeyVerificationStrategy
- All Implemented Interfaces:
- Describable<SshHostKeyVerificationStrategy>
A host key verification strategy that works in a similar way to host key verification on
 Unix/Linux this host (depending on how this strategy has been configured), and manual
 verification if the key provided by the remote host differs from the one currently saved
 in as the known key for this host. This manual verification is achieved through adding a
 
TrustHostKeyAction to the Computer the connection is being initiated for that can
 be actioned by a user with the appropriate permission to add a new key or replace an existing
 key in the known hosts database.- Since:
- 1.13
- Author:
- Michael Clarke
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from class hudson.plugins.sshslaves.verifiers.SshHostKeyVerificationStrategySshHostKeyVerificationStrategy.SshHostKeyVerificationStrategyDescriptor
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionString[]getPreferredKeyAlgorithms(SlaveComputer computer) Provides a list of preferred key algorithms for this strategy and computer.booleanbooleanverify(SlaveComputer computer, HostKey hostKey, TaskListener listener) Check if the given key is valid for the host identifier.Methods inherited from class hudson.plugins.sshslaves.verifiers.SshHostKeyVerificationStrategygetDescriptor
- 
Constructor Details- 
ManuallyTrustedKeyVerificationStrategy@DataBoundConstructor public ManuallyTrustedKeyVerificationStrategy(boolean requireInitialManualTrust) 
 
- 
- 
Method Details- 
isRequireInitialManualTrustpublic boolean isRequireInitialManualTrust()
- 
verifypublic boolean verify(SlaveComputer computer, HostKey hostKey, TaskListener listener) throws IOException Description copied from class:SshHostKeyVerificationStrategyCheck if the given key is valid for the host identifier.- Specified by:
- verifyin 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.
- Throws:
- IOException
 
- 
getPreferredKeyAlgorithmsDescription copied from class:SshHostKeyVerificationStrategyProvides a list of preferred key algorithms for this strategy and computer.- Overrides:
- getPreferredKeyAlgorithmsin class- SshHostKeyVerificationStrategy
- Returns:
- a list of algorithms; empty or null lists will be ignored
- Throws:
- IOException
- See Also:
- 
- Connection.setServerHostKeyAlgorithms(java.lang.String[])
 
 
 
-