1

I have a work computer that I can access using ssh on any computer. First I have to ssh into my work server. Then I have to ssh into the my work computer. It is super. However, I cannot figure out how to scp files from my work computer to my local desktop. What I have to do now is I have to go from the work computer and move it to the server. Then move it from the server to my local desktop. Is there a one step command so I don't have to move it to the server first?

Thanks.

2 Answers 2

1

Is you computer a windows computer? If so, check out winscp. http://winscp.net/eng/index.php

SCP will have to be enabled on your server.

2
  • 1
    I don't think he needs help with scp. He needs a way to do a two-level scp transfer with one command (work computer -> work server -> home computer) Commented Jul 21, 2010 at 2:06
  • using terminal on a mac. Yes thethimble two level scp is correct. Anyone know if this is possible? Commented Jul 21, 2010 at 2:14
1

You could leave the following command running on the work server:

ssh -N user@work_client -L public_ip:20000:work_client:22 

Where work_client is the IP address of the internal machine and public_ip is the public IP of the work server that you connect to.

That will create a tunnel from your internal machine port 22 to the 20000 port on the work server's public interface.

That will allow you to connect to the work server port 20000 from the internet and reach the internal machine.

2
  • did you mean the "<" at the end? Commented Jul 21, 2010 at 2:18
  • no I didn't. :) Typo. Commented Jul 21, 2010 at 2:20

You must log in to answer this question.