在Centos7.9配置SSH无秘钥链接ssh-copy-id报错/usr/bin/ssh-copy-id: ERROR: ssh: 的解决方法

报错内容如下:

/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: ssh: Could not resolve hostname controller: Name or service not known

第三句报错内容翻译出来是:无法解析主机名控制器:名称或服务未知

解决方法一:

vi /etc/hosts

查看自己的主机名是否有误,和我们所要创建的无秘钥名称是否一致。

解决方法二(适用多数情况):

vi  ~/.ssh/known_hosts     

进入这个文件把里面创建的所有内容都删除

扫描二维码关注公众号,回复: 16995293 查看本文章

再运行一次,报错问题就可以解决了。

猜你喜欢

转载自blog.csdn.net/m0_70800810/article/details/130916745