Rootop 服务器运维与web架构

scp: realpath ./xxx: No such file

在mac下往centos8中scp拷贝文件报错
scp -r xxx root@IP:/root
scp: realpath ./xxx: No such file
scp: upload “./xxx”: path canonicalization failed
scp: failed to upload directory xxx to .

原因可能是因为本地的openssh版本高于服务器上的openssh版本,版本跨度过大导致不兼容。
可以使用 -O 参数传输,表示使用传统SCP协议进行文件传输,而不是SFTP协议。
scp -r -O xxx root@IP:/root

原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/5118.html

作者:Venus

服务器运维与性能优化

评论已关闭。