本文介绍了通过scp复制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两台服务器.服务器 A B .我已经在服务器A上创建了用户

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

脚本在这里

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

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

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/

但抛出异常

scp: ambiguous target

我已经阅读了有关此错误的信息.据我了解,这是语法错误,但没有这样的问题

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

有人可以帮助我吗?

推荐答案

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

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/

应该做的工作.

这篇关于通过scp复制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 18:59
查看更多