gpt4 book ai didi

linux - 通过 scp 复制文件

转载 作者:太空宇宙 更新时间:2023-11-04 11:20:43 25 4
gpt4 key购买 nike

我有两台服务器。服务器 AB 。我在服务器 A 上创建了用户

脚本在这里

useradd --home-dir /opt/test --no-create-home --shell /opt/test/bin/test.sh --password XXXX test

我想通过 scp 从 B 连接服务器 A 并复制文件

scp -t -t  -r  /opt/test/ test@192.168.0.52:/opt/test/

但抛出异常

scp: ambiguous target

我读过这个错误。据我了解这是语法错误,但没有这样的问题

谁能帮帮我?

最佳答案

AFAIK scp 没有选项 -t(参见手册页 http://linux.die.net/man/1/scp)

scp -r /opt/test/ test@192.168.0.52:/opt/test/

应该完成这项工作。

关于linux - 通过 scp 复制文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18509457/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com