Package hudson.plugins.ec2.ssh.verifiers
Class AcceptNewStrategy
- java.lang.Object
-
- hudson.plugins.ec2.ssh.verifiers.SshHostKeyVerificationStrategy
-
- hudson.plugins.ec2.ssh.verifiers.AcceptNewStrategy
-
- All Implemented Interfaces:
Describable<SshHostKeyVerificationStrategy>
public class AcceptNewStrategy extends SshHostKeyVerificationStrategy
This strategy accepts any new host key and stores it in a known_hosts file inside the node directory called ssh-host-key.xml. Every next attempt to connect to the node, the key is checked against the one stored. It's the same approach as the accept-new value of the StrictHostKeyChecking flag of ssh_config.- 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
Constructors Constructor Description AcceptNewStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
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
-
-
-
-
Method Detail
-
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
-
-