scp 流量如何在两个远程主机之间流动?
如果您在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
较新版本的 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.看起来可以完成 。
Looks like it can be done.
如果您的 linux/bsd/unix 或 Mac 没有
-3
选项,只需从以下位置编译最新版本:http://www.openssh.org/portable.html很简单:
默认安装在
/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.htmlIt is as simple as:
It will be installed on
/usr/local/bin
by default. I just did that on my Mac OS X Lion.