Super User is a question and answer site for computer enthusiasts and power users. 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

I am running a headless Linux Ubuntu 10.0.4 on my server. I only allow access to the server using ssh (and scp).

I have a dev machine situated at home (behind a firewall) and I am able to copy files from my local (dev) machine to the server using scp. However, I now want to transfer files the other way, i.e. from the server to my dev machine.

Anyone knows the best way to do this?. BTW, I am running same OS on my dev machine (Ubuntu 10.0.4)

share|improve this question
up vote 1 down vote accepted

you just scp it back to your home machine

scp username@tohostname:/remotefile /newlocalfile

you can use the '-r' switch for recursive copying

share|improve this answer
Doh!, I'm embarrased I had to ask such a stupid question. (Hangs head in shame) – Takashi Dec 14 '10 at 14:10
Sometimes we just worked way too hard on a day, and forgot to consult captain obvious =) – bubu Dec 14 '10 at 14:13

Does your home dev machine have a public IP address or is the firewall doing NAT and assigning it a private address (which would probably be a 192.168.x.y address, although 10.x.y.z or (rarely) 172.(16-31).x.y are also possibilities)?

  • If it has a public IP address, you can configure your firewall to allow port 22 access to that address and it should Just Work(TM) from there.

  • If it has a private IP address, you'll need to configure port forwarding on the firewall so that incoming port 22 connections to the firewall are redirected to the dev box. Once that is set up, you should be able to ssh/scp to the firewall's public IP address and the connection will be transparently sent on to the dev box.

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.