----------         ----------              /|             ------------
|  Work  |         | Gateway|             | |             | cluster   |
|Station |--------------------------------| |-------------|           |
|        |         |        |          Firewall A         |           |
----------         ----------             | |             ------------
  • Users need to transfer DATA from their workstation to the cluster. (rsync / scp)
  • Firewall A ONLY allows connections (ssh) from gateway & specific internal subnets
  • All users have accounts on gateway server to reach cluster from outside allowed subnets

How can users use rsync / scp to transfer data from home (or outside allowed subnets) by using the gateway server as a tunnel?

For example I for remote terminals, a user must "ssh user@gateway" and then "ssh user@cluster" to receive a terminal on the cluster. If a user only performed "ssh user@cluster", the firewall would block the connection.



I usually use ssh's ability to use a config file. You can store this file here:


In this file you can add stanzas like this:

Host cluster
    ProxyCommand ssh usear@gateway nc cluster %p

This will then allow you to use tools such as ssh and rsync and target a user on the cluster system from the workstation.

$ ssh user@cluster


$ rsync somefile user@cluster:~

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.