Copy file via scp

╄→гoц情女王★ 提交于 2021-02-11 14:21:54

问题


I have two servers. server A and B . I have created user on server A

script is here

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

I want to connect server A from B via scp and copy file

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

but throws exeption

scp: ambiguous target

I have read about this error.As I understood this is syntactic error but there is not such a problem

Can anybody help me?


回答1:


AFAIK scp has no option -t (see man page http://linux.die.net/man/1/scp)

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

should do the job.



来源:https://stackoverflow.com/questions/18509457/copy-file-via-scp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!