Package hudson.plugins.ec2.ssh.verifiers
Class CheckNewHardStrategy
java.lang.Object
hudson.plugins.ec2.ssh.verifiers.SshHostKeyVerificationStrategy
hudson.plugins.ec2.ssh.verifiers.CheckNewHardStrategy
- All Implemented Interfaces:
Describable<SshHostKeyVerificationStrategy>
This strategy checks the key presented by the host with the one printed out in the instance console. The key should
be printed with the format "algorithm key". Example: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJbvbEIoY3tqKwkeRW/L1FnbCLLp8a1TwSOyZHKJqFFR
If the key is not found, the connection is not trusted. If it's found, the key is stored in the ssh-host-key.xml file
of the node directory and checked on every further connection.
- Since:
- TODO
- Author:
- M Ramon Leon
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.plugins.ec2.ssh.verifiers.SshHostKeyVerificationStrategy
SshHostKeyVerificationStrategy.SshHostKeyVerificationStrategyDescriptor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
verify
(EC2Computer computer, HostKey hostKey, TaskListener listener) Check if the given key is valid for the host identifier.Methods inherited from class hudson.plugins.ec2.ssh.verifiers.SshHostKeyVerificationStrategy
getDescriptor
-
Constructor Details
-
CheckNewHardStrategy
public CheckNewHardStrategy()
-
-
Method Details
-
verify
public boolean verify(EC2Computer computer, HostKey hostKey, TaskListener listener) throws IOException Description copied from class:SshHostKeyVerificationStrategy
Check if the given key is valid for the host identifier.- Specified by:
verify
in classSshHostKeyVerificationStrategy
- Parameters:
computer
- the computer this connection is being initiated forhostKey
- 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
-