ssh登录
scp免密码登录:Linux基础 - scp免密码登陆进行远程文件同步
执行scp一直是OK的,某天在本地生成了公钥私钥后,scp到某个IP报以下错误
The authenticity of host '192.168.xxx.xxx (192.168.xxx.xxx)' can't be established.
ECDSA key fingerprint is SHA256:hV1ohSBsI5iv1chD9soBoJQ8o1o9d//9v9zCFM/BK98.
Are you sure you want to continue connecting (yes/no)?
Host key verification failed.
lost connection
1、不修改/etc/ssh/ssh_config文件
ssh -o StrictHostKeyChecking=no 192.168.xxx.xxx
输入密码
2、修改/etc/ssh/ssh_config文件
修改/etc/ssh/ssh_config文件的配置,以后则不会再出现此问题
最后面添加:
StrictHostKeyChecking no
UserKnownHostsFile /dev/null