当前位置:   article > 正文

在SSH配置中,会出现ssh-copy-id -i /root/.ssh/id_dsa.pub root@172.16.1.41----Connection refused_/usr/bin/ssh-copy-id: info: source of key(s) to be

/usr/bin/ssh-copy-id: info: source of key(s) to be installed: "/root/.ssh/id

ssh-copy-id -i ~/.ssh/id_dsa.pub root@172.16.1.41
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: “/root/.ssh/id_dsa.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: connect to host 172.16.1.41 port 22: Connection refused

一开始以为是ssh的问题,一直在研究ssh的连接问题,发现一直检查也没有解决。
突然使用 ip a 发现
ens37: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:a7:26:c8 brd ff:ff:ff:ff:ff:ff
inet6 fe80::4687:125a:487a:d3f1/64 scope link noprefixroute
valid_lft forever preferred_lft forever

有一块网卡出现了问题,修改完网卡配置后,就成功了。
(修改网卡方式为:更改配置文件中的HWADDR的设置)

ssh-copy-id -i /root/.ssh/id_dsa.pub root@172.16.1.41
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: “/root/.ssh/id_dsa.pub”
The authenticity of host ‘172.16.1.41 (172.16.1.41)’ can’t be established.
ECDSA key fingerprint is SHA256:CITDEPi+EV4tbIok4PPGYZ6of8VT9T86tERwSTL/rPM.
ECDSA key fingerprint is MD5:91:9c:18:03:1b:cb:74:04:94:ff:c5:f2:5a:a8:b6:95.
Are you sure you want to continue connecting (yes/no)? yes
/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: INFO: 1 key(s) remain to be installed – if you are prompted now it is to install the new keys
root@172.16.1.41’s password:

Number of key(s) added: 1

Now try logging into the machine, with: “ssh ‘root@172.16.1.41’”
and check to make sure that only the key(s) you wanted were added.

成功!!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/187732?site
推荐阅读
相关标签
  

闽ICP备14008679号