当我运行 rsync 命令将一个目录从一台服务器复制到另一台服务器时,出现以下警告:警告:已将“111.222.33.40”(ECDSA)永久添加到已知主机列表中。命令如下:
rsync -avz /root/custom-scripts [email protected]:/root/
为什么此命令会产生此警告?这到底意味着什么?
答案1
rsync
正在使用,这是在以前没有遇到过远程主机时出现的ssh
正常信息消息。来自:ssh
man ssh
ssh automatically maintains and checks a database containing identifica‐ tion for all hosts it has ever been used with. Host keys are stored in ~/.ssh/known_hosts in the user's home directory. Additionally, the file /etc/ssh/ssh_known_hosts is automatically checked for known hosts. Any new hosts are automatically added to the user's file. If a host's iden‐ tification ever changes, ssh warns about this and disables password authentication to prevent server spoofing or man-in-the-middle attacks, which could otherwise be used to circumvent the encryption.