[ Tuesday, 16 October 2007, goudacaster ]
One of my favourite tools (that I use almost everyday) is PuTTY. I use it both on Windows (very useful because Windows has no SSH client) and on Linux. It is a program that enables SSH connections using a graphical interface. It also allows for the establishment of SSH tunnels as well as omitting some of the restrictions to Internet access.
Using PuTTY, we gain all the possibilities described in the article SSH Tunnels: Bypass (Almost) Any Firewall and several others, but without the necessity of using long and complicated commands at the terminal. I have mentioned this article (pazkooda (2006)) because knowledge about things on the backend of SHH is very useful. What’s more, PuTTY gives us an opportunity to connect to the outside world even if we only have access to ports 80 or 443 (both usually available on office networks). PuTTY can be downloaded from this website. You can also find lots of additional software, such as PSCP and PSFTP (both mechanisms for secure copy/sftp), are very useful applications used to secure file transfers over the Internet. I’ll describe those programs later on in this article.
After we run PuTTY, the following window populates the screen:
On this window you can see a couple of sessions that I created. All of the visible sessions are from different environments but directed to the same machine that operates on Ubuntu Linux. I often work in different places, so I’ve created a separate profile for each localisation.
Creating a New Session
To create a new session you should just type the name or IP address of the computer that you want to connect with, in the field “Host Name (or IP address)”, and in the field “Port” typing the port number that the SSH service is listening to.
In my example, I am connecting with port 22 (default for this service) to a non existing “ssh.jakilinux.org” server. In the field labeled “Saved Sessions” we type our session’s name (anything you want, I’ve just called it “Moja sesja”), and we click the “Save” button, so PuTTY will save the session.
And now what should we do, to omit the restrictions of the Internet access? Let’s imagine that, in our office, we connect to the Internet by a proxy server that requires authentication. Let’s say, for example, that the server’s name is “proxy.mojafirma.pl”, and it listens on the port 8080 with the user name “oudacaster”, password “12345″. In the “Category” window, we pick the “Proxy” option up and fill in fields with the proper data just like in the picture below. For simplicity, I’ve underlined the required fields on red.
Since authentication by the Windows domain is used in our office, I’ve added the domain name and a backslash (“ad\”) before the user’s name. In other cases it is not necessary.
Warning! To save the settings, we came back to the “Session” and in the field “Saved Sessions” we choose a previously created session (“Moja sesja”), then click the “Save” button. If we omit this step the changes to the settings will not be saved. Next, we are able to pick our session from the list and click the “Open” button. The result is that we get a terminal window, just like depicted below (I’ve covered the real user’s and remote system’s name):
Creating Encrypted Tunnels
Just like other SSH clients, PuTTY enables us to create encrypted tunnels. To add a tunnel to our session, we pick the session and click “Load”, which loads, or applies, the settings. Next, we choose the “Tunnels” option from the “SSH” category. In the picture below we can see one tunnel to my home network. On the fields below it, I’ve prepared a tunnel to “www.google.com” (in case our office network admin blocked my access to this page).
After filling in the required fields and clicking “Add” we see the note: L10050 www.google.com:80
This means that after successful logging in to the server, we’ll be able to access the “www.google.com” website through the tunnel (locally on the port 10050). Therefore, to get to our desired website you should just simply type the address “http://localhost:10050/” in your web browser. We may also create similar tunnels to whatever places you want, anywhere on the Web, even for FTP or IRC servers (very often this is not available through office networks).
The PSCP and PSFTP commands, which I mentioned earlier in this text, enable us to copy files using an encrypted SSH connection. You should download the proper files of either PSCP or the PSFTP program from the respective website mentioned earlier, and save them to a directory (for example “C:\Temp”). Next, you should run a terminal and type the following command:
pscp -load “Moja Sesja” C:\Temp\test.txt email@example.com:~/
This command will copy the file “C:\Temp\test.txt” to the remote server “ssh.jakilinux.org” of the home directory using the session named “Moja sesja”.
Warning! Linux is case sensitive just like PuTTY.
Translated by p_lupkowski, Proof-read by fgibbs
Warning: include_once(/sites/polishlinux.org/wp-content/themes/jakilinuxorg/google_article_inside.php): failed to open stream: No such file or directory in /sites/polishlinux.org/wp-content/themes/jakilinuxorg/single.php on line 48
Warning: include_once(): Failed opening '/sites/polishlinux.org/wp-content/themes/jakilinuxorg/google_article_inside.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /sites/polishlinux.org/wp-content/themes/jakilinuxorg/single.php on line 48
Subscribe to RSS feed for this article!