robin 发表于 2018-1-10 07:34:15

服务器做了格式化后(ip没变),jenkins自动部署报错

  jenkins自动部署报错如下:
  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

  @    WARNING: REMOTE HOST>  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
  Someone could be eavesdropping on you right now (man-in-the-middle attack)!
  It is also possible that the RSA host key has just been changed.
  The fingerprint for the RSA key sent by the remote host is
  d0:00:7c:bc:88:5c:dc:de:89:61:44:30:00:60:f9:b2.
  Please contact your system administrator.
  Add correct host key in /root/.ssh/known_hosts to get rid of this message.
  Offending key in /root/.ssh/known_hosts:1
  RSA host key for 192.168.x.xxx has changed and you have requested strict checking.
  Host key verification failed.
  出现原因:
  ssh登录过的服务器的RSA公钥保存在.ssh/known_hosts中,由于格式化了服务器磁盘,但还用的相同IP,这会导致公钥与服务器的私钥配对失败,无法登陆服务器。这时候需要删除旧服务器的公钥才行。
  解决方案:
  在jenkins的服务器上vim ~/.ssh/known_hosts
  删除服务器ip的相关rsa的信息即可.
页: [1]
查看完整版本: 服务器做了格式化后(ip没变),jenkins自动部署报错