Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

Possible Duplicate:
Forward SSH traffic through a middle machine.

I'm currently deploying a web app that requires files be copied to an internal server via a public facing server.

My current workflow looks like this:

  • scp files to
  • ssh to publicserver
  • scp files to

What I'd really like to do is to copy files to the internal server in one go - either using a GUI, or via the command line.

Any ideas?

share|improve this question

marked as duplicate by Rich Bradshaw, random Sep 9 '10 at 2:26

This question was marked as an exact duplicate of an existing question.

Set up an alias for the internal server in ~/.ssh/config as in… – Gilles Sep 8 '10 at 20:06
up vote 0 down vote accepted

Use ssh to forward your port and then make scp use that port:

ssh -L


scp localhost:/directory -P yourport

I think that should already do the trick. You might want to take a look at man ssh and man scp if I got the arguments in the wrong way.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .