Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我连接到网桥服务器,然后从那里连接到另一台服务器,所以我想知道是否可以使用 SCP 命令在一行中复制文件或文件夹,而不必站在网桥上并从远程 scp桥接,然后从桥接 scp 到本地。如果不可能,我会理解的。感谢您的任何回复。
是的,如果您的第一台服务器支持 IO 重定向:
scp -oProxyCommand="ssh -W %h:%p user1@server1" user2@server2:/path/to/remote.file local.file