Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Yesterday I asked a question about restricting access via ssh, and I was advised to have my machine access the data on the public workstation. As an unfortunate necessary follow-up to that, how can I set up an automated data transfer script from a public workstation to my own private computer if the public machine is behind a firewall?

share|improve this question
Just to give some context, this public workstation is part of a hospital complex, which means (1) dealing with the hospital IT department is always difficult, and (2) firewalls are a way of life due to HIPAA, and I will almost certainly not be able to have someone poke a hole in it for me. Hopefully in the long-term we'll find a better way to make the data available, but for now c'est la vie. – eykanal May 3 '11 at 17:12
Can you currently ssh from your machine to the public workstation? I assume so, but just wanting to make sure. Does your machine run a Unix-like OS? And are you (and the other users) comfortable with an account on your machine having ssh-key-based access to the public workstation? – Mike Renfro May 3 '11 at 18:27
@Mike - no, that's the problem. I can ssh from the workstation to my machine, but not the other way around. My machine is running Mac OS 10.6.7. My main problem is that I'm not comfortable with the public machine having ssh-key-based access to my personal workstation. – eykanal May 3 '11 at 18:30
If you can't ssh to the public workstation, then I don't see any solutions other than finding some remote storage that is accessible from both your computer and the public one. I'm boggled that the hospital allows multiple people access to one account, and the ability to ssh out from the public system, but nobody can get in, even from a protected network segment. You may just have to find a sympathetic person in IT to make some more options available. – Mike Renfro May 3 '11 at 19:38
up vote 2 down vote accepted

Use OpenVPN to create a VPN server on the outside public machine. Then set up the private NAT'ed machine as a client which connects to the outside VPN server. This will give you a secure connection, and also bypasses the need for opening ports on the firewall (provided there is no egress filtering in place, in which case port 1194 UDP would need to be opened). Once the VPN is in place, data transfer in either direction should be trivial, and you're no longer directly affected by the effects of a NAT environment. You can then create SSH keypairs and use them with scp to allow the machines to log into one another without requiring a password.

share|improve this answer

If machine behind firewall is allowed to do SSH to external sites, you just can sign a free dynamic DNS service and create a Rsync over ssh script (configure the ssh to use keys instead password authentication) or just run an scp command by cron.


Dive into:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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