3

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 publicserver.example.com
  • ssh to publicserver
  • scp files to 10.2.68.10

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?

Rich Bradshaw
  • 6,416
  • 3
  • 31
  • 43

1 Answers1

0

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

ssh -L yourport:internal.host:hostport user@publicserver.example.com

Then:

scp yourfile.xxx 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.

evnu
  • 465
  • 3
  • 9