Sometimes you want to connect to a computer under a VPN, but the network firewall does not allow any insecure access and the only way to work around the limitations imposed is through a secure shell (SSH) connection. This post will show you how you can set up a secure graphical connection (e.g. remote desktop) through SSH.
SSH is basically secure, encrypted channel between network devices. If you want to tunnel through the firewall to get a secure connection the first thing you need is a software like PUTTY. Setup the putty like this:
1. Open the PUTTY, put the network server which is enable to make SSH connection as the host name and set SSH as the connection type.
2. On the category tab on the left, click on the SSH and then on X11. This feature enables you to forward the graphical content from the computer that you want to connect to. Check the “Enable X11 forwarding” box.
3. Now choose “Tunnels” on the left tab. Software ports should be entered on the section saying “Add new forwarded port”. In the “Source port box” enter: “localhost:33890” (Yes, the box is so small, I know! :D). 33890 is not a critical number. This is the software port on your computer that will be used. You can put other port numbers there as well. In the Destination box enter: “targetPC:3389”. Replace the targetPC with the name of the computer you want to connect to. 3389 is the port which remote desktop software uses. If you want to connect using another software find its software port and replace the 3389 with it.
4. Press the “Add” button.
5. Now you have set up the PUTTY. Press the “Open” botten.
6. A command window opens and asks you for username and password. Once you enter them the connection is successfully established.
7. Open the remote desktop (or any other program you want to use). Set the “localhost:33890” as the computer you want to connect to.
8. Press the “connect” button and you should be right at the computer you wanted to connect to.