-
Improvement
-
Resolution: Not A Defect
-
Minor
-
None
I have read the following:
And exists the Host Key Verification Strategy option and we have available the following options:
1. Known hosts file Verification Strategy
2. Manually provided key Verification Strategy
3. Manually trusted key Verification Strategy
4. Non verifying Verification Strategy
Well, for security reasons, the 4th can be ignored. For the three first options, when would be mandatory use one approach over the other? - for what scenario(s)? - I am posting this issue, because is not clear in the official documentation - I think is wise add some scenarios to help the developer choice the best option.
Thanks for your understanding
- is related to
-
JENKINS-69264 [ssh-agent] Use SSH Host Key verification strategies from git-client-plugin
-
- Open
-
4 - it is insecure as you said so the recommendation is to not use it.
3 - IMHO is odd you have to configure the agent wait for it to connect and verify the public key is correct.
2 - This is the option that allows Jenkins to manage the public key, so Jenkins has the control.
1 - In this case the public key is in the filesystem in the home of the user used by Jenkins to run (~/.ssh/known_hosts), it is in the folder ~/.ssh that should have 0600 permissions (it is mandatory on all SSH implementations)
In any case, there is a security risk of exposing sensible data, Why? because you are using the public key of the host that it is shared by the SSH service every time you try to connect so it is public, the private key of the host is in the agent in the folder /etc/ssh and is managed in that system.