scp实现将本地的文件复制到远端

2023-12-15 17:01:44

复制test 文件到192.168.xxx.xxx的地址的跟目录/,登陆名称是root

scp test root@192.168.xxx.xxx:/ 

如果出现报错

The authenticity of host ‘192.168.xxx.xx (192.168.xxx.xx)’ can’t be established.
ECDSA key fingerprint is SHA256:xxxxmOCmf3G26VX1rwFh1wArLy4T4k33kEMBl482mgw.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Host key verification failed.
lost connection

加上“-o StrictHostKeyChecking=no”的选项,去掉对主机的验证检查,当然这只是临时的解决办法

scp test root@192.168.xxx.xxx:/  -o StrictHostKeyChecking=no

文章来源:https://blog.csdn.net/weixin_42163707/article/details/135019340
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。