0

I want to connect to my account in a server of my university. When I’m there I only have to do

 “ssh user@FinalServer/home/user” 

or create a folder using

 “sftp://user@FinalServer/home/user”.

But the problem comes when I’m at home. Here I have to connect first to a concrete server in a concrete port and then do the connection to the FinalServer.

 1st. “ssh user@IntermediateServer:54022”
 2nd. “ssh user@FinalServer/home/user”

And to do a sftp first I have to do it to the Intermediate Server and then to the final server. If it’s possible I want to do a folder like the first example but I don’t know how.

I’m searching for a solution in Linux and other in Windows.

I’m trying to do something with Putty or WinSCP but I don’t know how. Thanks a lot and sorry for my bad English.

1 Answer 1

0

If your intermediate host allows TCP forwarding, you could achieve what you want, but the ssh connection to the intermediate server is still needed. Both these commands would be run from your home:

ssh -f -p 54022 user@IntermediateServer -L 2000:FinalServer:22 -N
ssh -p 2000 user@localhost

First one stablishes a tunnel from your home pc at port 2000 to the final server at port 22 (standard for SSH) through the intermediate server at port 54022. Launch the first command and check if there is a new LISTENing port on your home PC (netstat -na | grep LIST | grep 2000), if so you have your tunnel up and running. Just perform the commands as if your local PC were the final server (at port 2000)

NOTE: I'm using port 2000 as I suposse there is a ssh server running on your PC, but you could use whatever port you'd like.

You must log in to answer this question.

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