2

The question describes how to SSH into a machine that can only be accessed through one or more hosts (that can also be SSH'd into).

Is there an equivalent way of using scp? That is, copy a file to my local machine from the far machine (assuming I have password or key access to all machines along the way)?

1

1 Answer 1

6

It works the same way as the multi-hop ssh if you will use the ProxyCommand. The ProxyCommand is transparent regardless what you do above that.

Host proxy
  Hostname proxy.tld
  User proxy_user
Host target
  Hostname target.tld
  User target_user
  ProxyCommand ssh -W %h:%p proxy

Then running scp file target: will copy the file over the proxy to the target.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.