Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Jul 21 '10 at 16:15

This question came from our site for professional and enthusiast programmers.

2 Answers 2

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.

share|improve this answer
    
did you mean the "<" at the end? –  gatoatigrado Jul 21 '10 at 2:18
    
no I didn't. :) Typo. –  sespindola Jul 21 '10 at 2:20

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.

share|improve this answer
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) –  thethimble Jul 21 '10 at 2:06
    
using terminal on a mac. Yes thethimble two level scp is correct. Anyone know if this is possible? –  keith Jul 21 '10 at 2:14

Your Answer

 
discard

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