【Linux】INFO: attempting to log in with the new key(s), to filter out any that are already...

报错内容:
ssh-copy-id master
/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: connect to host master port 22: Connection refused

今天用ubuntu18.04版本虚拟机配置SSH免密登陆,创建公钥能成功创建,可是ssh-copy-id拷贝命令一直失败报错,在网上也找了很多方法,比如配置正确的IP映射,修改网络之类的,都没用
【Linux】INFO: attempting to log in with the new key(s), to filter out any that are already..._第1张图片
后来我卸载了虚拟机的openssh-client这个服务

sudo apt remove openssh-client

【Linux】INFO: attempting to log in with the new key(s), to filter out any that are already..._第2张图片
然后重新下载ssh服务

sudo apt install ssh

【Linux】INFO: attempting to log in with the new key(s), to filter out any that are already..._第3张图片
这里面我们可以看到新安装了6个安装包,其中包括了我们之前卸载的openssh-client

安装成功后再次测试,发现已经能成功创建密钥并配置本机免密登录了~
【Linux】INFO: attempting to log in with the new key(s), to filter out any that are already..._第4张图片
出现这个报错应该是我刚新建的虚拟机系统缺少了一些ssh服务的安装包,我们直接通过安装所有ssh服务安装包得以解决,如何本篇文章对你有帮助,记得点赞收藏+关注哦

你可能感兴趣的:(日常报错解决,linux,服务器,运维,ubuntu,ssh)