ssh connection over firewall

Advertisement

Mario_m
Joined:
Posts:
1

ssh connection over firewall

Is it possible connect to a server by ssh over a firewall.

In Putty I connect to a local machine by telnet and then I set the command:ssh -CX servername. Is it possible to do that with WinSCP?

Reply with quote

Advertisement

Guest

Re: ssh connection over firewall

Mario_m wrote:

Is it possible connect to a server by ssh over a firewall.

In Putty I connect to a local machine by telnet and then I set the command:ssh -CX servername. Is it possible to do that with WinSCP?

I have found a solution. So my configuration looks like this:

A-LocalPC -> B-PassthroughServer -> C-Firewall -> D-Server

There is no direct connection to the D-Server from my A-LocalPC. Only by the B-PassthtroughServer there is a SSH connection to D-Server and a SSH connection from the A-LocalPC to the B-PassthroughServer.

So I take the plink.exe utility from the putty project and create a SSH tunnel to the D-Server Server. Open a Dos Box and type the following command:

plink.exe -ssh passthrougserver -l username -pw password -L 666:D-Server:22

(Port 666 is an imagine local Port of your PC so make sure the port is not used by another application, use a port scanner instead)
Please check that your Dos Box has connected to the passthrougserver. You will see a command prompt. The port should always be connected during the SCP session

Then start WinSCP separately. Make a new session and type localhost as hostname and 666 as portname. Use the username and password as you would normally use for the D-Server.

Now you have a direct tunnel. You can do the same using the last putty release instead of using plink.exe. Just create a new tunnel configuration and start WinSCP

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,300
Location:
Prague, Czechia

Re: ssh connection over firewall

You can also read FAQ covering the topic.

Reply with quote

Advertisement

You can post new topics in this forum