-2

I am connected to a bridge server and from there I am connected to another server, so I wanted to know if it's possible to use SCP command to copy files or folders in just one line, without having to stand on the bridge and scp from remote to bridge and then scp from bridge to local. If its not possible I will understand. Thank you for any response.

  • 2
    Yes it of course possible, provided your scp remote server reachable to other remote server directly – Rupesh Jun 14 '17 at 02:40
  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. If you feel its on-topic elsewhere, then [ask for a migration](http://meta.stackoverflow.com/q/254851) – jww Jun 14 '17 at 11:09

1 Answers1

0

Yes, if your first server supports IO redirect:

scp -oProxyCommand="ssh -W %h:%p user1@server1" user2@server2:/path/to/remote.file local.file
Jakuje
  • 24,773
  • 12
  • 69
  • 75