SCP:通过一个盒子从一个盒子路由到另一个盒子,并且对两个盒子都有权限。

时间:2018-11-30 16:05:34

标签: ssh scp

假设我有一个可以访问A框和B框的终端,并且需要将内容从A框复制到B框。

但是,在框A到框B中向我的用户授予登录权限对我来说是不好的形式。

因此,我需要运行以下命令:

scp boxA:etc . 
scp etc boxB:.
rm etc
在具有两个权限的框中输入

有没有一种方法可以使用scp绕过此中间写操作,而仅通过根终端从boxA传输到boxB?

1 个答案:

答案 0 :(得分:1)

使用-3 flag

     -3      Copies between two remote hosts are transferred through the
             local host.  Without this option the data is copied directly
             between the two remote hosts.  Note that this option disables
             the progress meter.
相关问题