Connecting ftp server via secure SSH tunnel

One of TCP/IP protocol features is a possibility to tunnel one connection through another. Therefore you can connect a common ftp server via secure SSH tunnel between server and your computer.

To create a SSH tunnel it is necessary that the remote host had a ssh service started besides ftp service. As a rule at Linux/Unix/BSD hosts both services work on default.

Using programs like PuTTY you can create SSH tunnel between your computer and server. Let's start PuTTY and create a new session:

Use PuTTY to create ssh session for tunnelling ftp connections

You should set remote host address and the port, ssh service is started on (22 on default).

Now you should set redirection of the port from your computer to the remote host port - port 3121 of the interface 127.0.01 will be redirected to the 21 port of the server.

SSH local port forwarding settings

Let's clear up how it works. When you start the session PuTTY will establish connection to the server your_host by 22 port. After authorization (login and password entry) is performed and ssh connection to the server is established PuTTY will redirect all connections with to your_host:21 via secure ssh tunnel.

Now in profile connection settings set ftp server address -, port 3121 and save the profile.

When FTPGetter connect to localhost - PuTTY forward this connection through secure ssh tunnel to remote ftp server

As soon as FTPGetter connects to port 3121 of interface PuTTY will redirect this connection via tunnel to your_host:21. Thus, it is possible to work with common ftp servers via secure ssh tunnel not being afraid that your data can be captured or changed by intruders.

Therefore, it is possible to establish connection via secure ssh tunnel not only to ftp server but also to POP3 and SMTP servers.