zoukankan      html  css  js  c++  java
  • ssh-copy-id 秘钥分发报错

    重装了操作系统,本机/root/.ssh/known_hosts文件存在着上一次分发记录,所以导致以下报错

    [root@node1 ~]# ssh-copy-id root@192.168.1.107
    /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
    /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 ECDSA key sent by the remote host is
    ERROR: SHA256:VK3OAQJiLsUM+G2RAb0iJ9HiCFAVw1UOc+5DDshb57w.
    ERROR: Please contact your system administrator.
    ERROR: Add correct host key in /root/.ssh/known_hosts to get rid of this message.
    ERROR: Offending ECDSA key in /root/.ssh/known_hosts:17
    ERROR: ECDSA host key for 192.168.1.107 has changed and you have requested strict checking.
    ERROR: Host key verification failed.
    

    解决办法

    [root@node1 ~]# ssh-keygen -R 192.168.1.107    
    

    再次秘钥分发即可免密登录

    [root@node1 ~]# ssh-copy-id root@192.168.1.107    
    
  • 相关阅读:
    暑期学习录
    08管道命名符
    07输入输出重定向
    06grep与find命令详解
    05tar命令详解
    04文件目录管理命令
    03工作目录切换命令与文本文件编辑命令
    02系统状态检测命令
    01常用系统工作命令
    vue2.0细节剖析
  • 原文地址:https://www.cnblogs.com/hsyw/p/14802682.html
Copyright © 2011-2022 走看看