我想从命令行将
github.com添加到known_hosts文件中,因为我正在创建一个配置远程服务器的puppet清单.
原文链接:https://www.f2er.com/ubuntu/348539.html我试过了:
"ssh-keyscan -H github.com > /home/ubuntu/.ssh/known_hosts"
但是当服务器尝试访问github时:
Failed to add the RSA host key for IP address '207.97.227.239' to the list of known hosts (/home/ubuntu/.ssh/known_hosts).
我也尝试过:
"ssh-keyscan -H github.com,207.97.227.239 > /home/ubuntu/.ssh/known_hosts"`
但访问github抛出:
Host key verification Failed.
我确定这是没有额外用途但是如果我ssh我的服务器然后ssh github并按照步骤我得到以下消息永久地将’github.com,207.97.227.239′(RSA)添加到已知主机列表中然后它将完美地工作.
谢谢