Reputation: 2444
We are using CloudBees Jenkins to run a Maven job and the build is failing when it tries to deploy Javadoc to our private Javadoc server. This is the error in the logs:
The authenticity of host 'javadoc.foo.com' can't be established.
RSA key fingerprint is 3e:69:41:8a:ec:d1:4c:d9:75:ef:7d:71:b7:7d:51:d0.
Are you sure you want to continue connecting? (yes/no):
The authenticity of host 'javadoc.foo.com' can't be established.
I would like to modify the known_hosts
file on the m1.large and m1.small nodes but i don't know how.
Just thinking out loud, should I have a pre-build step that modifies the known_hosts
file on the fly? Or perhaps copy a pre-built known_hosts
file in the /private
directory?
Sorry if this is a newbie question, but I am new to this whole "dynamically created build machines"...
Upvotes: 1
Views: 705
Reputation: 32627
Ben W's answer is quite good. Alternatively, I would make sure I can login via the console from that machine to wherever so that the ssh client would store the settings by itself.
Upvotes: 0
Reputation: 4054
The most secure way is to preconfigure known hosts with the values you are expecting - appending the appropriate line for the server you're connecting to.
# Run this manually:
ssh -o UserKnownHostsFile=foo javadoc.foo.com
# Take that file and put it in your private DAV share, and then
ssh -o UserKnownHostsFile=/private/<account>/known_hosts javadoc.foo.com
Upvotes: 2