2

The place I work has a login server, and then I login to a Linux box from that login server. As in,

ssh login@host

ssh computer_name

providing authentication each time. If I'm working from my laptop, which is (unfortunately) running Vista, I run putty to get into login@host then login to computer_name from the terminal it opens.

I will frequently have to get local files from my computer onto the Linux box, and vice versa. Normally I use WinSCP to transfer to the login@hostname and then scp to computer_name, or the reverse. However, login@hostname has very very limited storage space, and I cannot get larger files through that way. Is there a way to bring files directly between computer_name and my laptop?

  • You are having an option to mount the volumes like mounting the Linux drive to Windows machine and assign drive letters. You can find several application to do that for you. Or You can do ftp file transfer with where it left of option enabled. where you can start from where the file transfer is interrupted. – vembutech Oct 8 '14 at 20:29
1

Set up a port a local port forward. For OpenSSH it would mean:

$ ssh login@host -L 2222:computer_name:22

which causes any connectionns to port 2222 on localhost be forwarded to port 22 on computer_name via - and that is important here - host. Then follow

$ scp -P 2222 computer_name_user@localhost:remote local

Obviously this also allows you to connect to computer_name

$ scp -p 2222 computer_name_user@localhost

PuTTY is be capable of doing the port forwarding (and it also has scp as far as I recollect), yet while it is a sold piece of software, I would actually suggest using OpenSSH under Cygwin, since that gives you the de-facto standard SSH interface (with all the bells and whistles).

I couldn't quickly find a clear duplicate, but you probably want to check:

0

The easy way to do things through two layers of SSH is to hide the intermediate layer.

Set up a ProxyCommand so that you can directly run ssh computer_name from the original client. Set up public key authentication and activate agent forwarding (ForwardAgent yes in ~/.ssh/config), so that you don't need to provide credentials explicitly to the intermediate machine.

Now that ssh computer_name works seamlessly, just use scp or rsync or whatever you like to copy files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.