zoukankan      html  css  js  c++  java
  • ssh-copy-id 遇到ERROR: Host key verification failed.

    由于在/home/user/.ssh/known_hosts中记录的目标机器信息与当前不符(多为重用了IP地址造成),执行Ssh-copy-id时有下面的报错:

    [bmsc_ci@jenkins-slave2 ~]$ ssh-copy-id -i /home/user/.ssh/id_rsa.pub root@192.168.125.112
    /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

    /usr/bin/ssh-copy-id: ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    ERROR: @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
    ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    ERROR: IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
    ERROR: Someone could be eavesdropping on you right now (man-in-the-middle attack)!
    ERROR: It is also possible that a host key has just been changed.
    ERROR: The fingerprint for the RSA key sent by the remote host is
    ERROR: 39:b0:5f:e1:01:77:fe:5b:b9:ff:2d:2b:a0:fd:f5:3a.
    ERROR: Please contact your system administrator.
    ERROR: Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
    ERROR: Offending RSA key in /home/user/.ssh/known_hosts:185
    ERROR: RSA host key for 192.168.125.112 has changed and you have requested strict checking.
    ERROR: Host key verification failed.

    解决方法:

    ssh-copy-id  -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null  -i /home/user/.ssh/id_rsa.pub root@192.168.125.112

    同样地,此情况时ssh, scp 也会报错,解决办法是:

    ssh -q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@192.168.125.112

    scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -r /var/tmp/performance/moo.dat root@192.168.125.110:/var/tmp/

  • 相关阅读:
    unity与android交互总结
    Unity3d 下websocket的使用
    Unity的Shader如何控制投影颜色
    _LightColor0将会是主要的directional light的颜色。
    Unity shader saturate
    今天写shader流光效果,shader代码少了个括号,unity shader compiler卡死且不提示原因
    欧几里得空间
    Unity ios、android、pc一键打包(一)
    [AR]高通Vuforia Getting Started
    unity3d 为什么要烘焙?烘焙作用是为了什么?
  • 原文地址:https://www.cnblogs.com/tlmn2008/p/5306632.html
Copyright © 2011-2022 走看看