jenkins centos slave起不来报错The SSH key presented by the remote host does not match the key saved in the Known Hosts file against this host. Connections to this host will be denied until the two keys mat

时间:2022-05-30 09:55:53

场景:我的centos-204是一台centos的机器,本来用https://www.cnblogs.com/zndxall/p/8297356.html 的centos slave方式搭建ok的,一直在使用中,之前重启机器slave相关服务也是可以自动起来的,但是最近我觉得我的这台机器构建太慢了,让运维帮我加成四核的cpu,结果他加完了,重启了机器,slave相关服务就怎么也起不来,一直报错:

jenkins centos slave起不来报错The SSH key presented by the remote host does not match the key saved in the Known Hosts file against this host. Connections to this host will be denied until the two keys mat

没办法,查询了一圈还是没找到答案,后面干脆重新装了centos-204,启动方式还是“lunch slave agent via SSH”,依然起不来,着急啊,后面换成‘lunch slave agent via java web start’,然后重新下载slave.jar放到centos-204机器上配置的工作目录下,然后在slave.jar所在的路径下执行启动命令(&后台执行):

jenkins centos slave起不来报错The SSH key presented by the remote host does not match the key saved in the Known Hosts file against this host. Connections to this host will be denied until the two keys matjenkins centos slave起不来报错The SSH key presented by the remote host does not match the key saved in the Known Hosts file against this host. Connections to this host will be denied until the two keys mat

java -jar slave.jar -jnlpUrl http://192.168.8.246:8080/jenkins/computer/centos-204/slave-agent.jnlp -secret 40aa8b30d63226290a25a4e18e3bdfe867b975bd24d5e1fbbc46642f2d9d4d &

真坑,上面这个方式,比较不稳定,时不时的slave 204机器又掉线了,我各种尝试,无意中重新add了下面的用户名密码,又登陆上了!!!!

jenkins centos slave起不来报错The SSH key presented by the remote host does not match the key saved in the Known Hosts file against this host. Connections to this host will be denied until the two keys mat

希望不要再掉线了,我一个在职孕妇,最怕伤脑子的事了,一着急我就紧张,我就吃不好睡不好,嘻嘻,夸张了点了。。。。

完整搭建参考:

https://www.cnblogs.com/zndxall/p/8297356.html