scp 流量如何在两个远程主机之间流动?

发布于 2024-09-13 01:33:23 字数 444 浏览 6 评论 0原文

如果您在 2 个远程服务器之间发出 scp 命令,流量将直接在主机之间流动,还是从 Remote1 => 流动?本地机器 =>远程2?

例如,我在笔记本电脑上发出以下命令:

scp [email protected]:/Files [email protected]:/Files

If you issue a scp command between 2 remote servers, will the traffic flow directly between the hosts, or will it flow from Remote1 => Local Machine => Remote2?

For example I issue this command on my laptop:

scp [email protected]:/Files [email protected]:/Files

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

素手挽清风 2024-09-20 01:33:23

较新版本的 scp(自 2011 年起)具有选项 -3,它将通过您的本地计算机路由流量。如果主机位于不同的网络并且无法看到对方,则这非常有用。 在超级用户上找到了这个。从您链接的文章来看,主机通常会尝试直接相互连接。

Newer versions of scp (since 2011) have the option -3 which will route the traffic through your local machine. This is useful if the hosts are on different networks and can't see each other. Found this on SuperUser. From your linked article it seems like normally the hosts will try to connect directly to each other.

作妖 2024-09-20 01:33:23

看起来可以完成

Looks like it can be done.

眼藏柔 2024-09-20 01:33:23

如果您的 linux/bsd/unix 或 Mac 没有 -3 选项,只需从以下位置编译最新版本:http://www.openssh.org/portable.html

很简单:

./configure; make ; sudo make install

默认安装在 /usr/local/bin 上。我刚刚在我的 Mac OS X Lion 上做到了这一点。

If your linux/bsd/unix or Mac do not have the -3 option, just compile the last version from: http://www.openssh.org/portable.html

It is as simple as:

./configure; make ; sudo make install

It will be installed on /usr/local/bin by default. I just did that on my Mac OS X Lion.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文