Contents

SSH Tutorial

SSH Port Forwarding

$ ssh -D 7070 username@someserver.com

SSH Reverse Tunneling

Destination Server

sshd_config

TCPKeepAlive yes
ClientAliveInterval 30
ClientAliveCountMax 99999

Command Line $ ssh -R 1234:localhost:22 username@someserver.com

Remote Machine

sshd_config

GatewayPorts yes

Command Line $ ssh someserver.com $ ssh localhost -p 1234

Putty and SSH

Installing Putty

To install putty on your system first goto the website http://www.chiark.greenend.org.uk/~sgtatham/putty/ download the latest putty.exe. You can also just download the entire suite of putty applications here. I highly suggest that when downloading these applications you create the directory C:\Program Files\putty. And either unzip the suite into that directory or download all of the *.exe's to that directory path.

Using Putty for a SSH session

To run putty, find where you have downloaded the putty.exe file then double click on it. You might want to make a desktop shortcut, via right clicking and creating a shortcut. Then you could have it on your desktop or on a toolbar. When you double click on the executable you should get a dialog like the one below.

Image:Putty_configuration_1.jpg

In the "Host Name (or IP address)" text field you need to type the IP address or hostname that you want to access. Then you need to select the appropriate protocol type you'll be using. Which in our case is "SSH", select that radio button. You could optionally save this session. Which means save the address/hostname, protocol type, and other settings so you don't have to type it in every single time! You can do that by typing in some kind of identifying name like "home" or something in the "Saved Sessions" text box, then clicking the save button will save the session information. When you are done selected and saving all of your session info, click Open to access the server. You'll most likey see a dialog like the one below.

Image:Putty_configuration_1a.jpg

You probably want to type your username that you got when you recieved all of your login information. Then press enter. You'll then see a the state of the dialog change like the one below.

Image:Putty_configuration_1b.jpg

You probably want to type your password that you got when you recieved all of your login information. Then press enter. You'll then see a the state of the dialog change like the one below.

Image:Putty_configuration_1c.jpg

Changing your password

At this point I would highly suggest that for security reasons that you if you reset your own password, unless you already have then skip this part. Using the passwd unix command. That command will then prompt you for your "old password", then a "new password", it will then ask you to retype the "new password". And then you've successfully changed your password you should probably try to commit it to memory. No when selecting a password you should use at least 1 capital letter, and 1 special character (i.e. if you press shift and 0-9 on the keyboard) and a length of greater than 8 characters minimal, it really should be greater than 12.

$passwd
Red CrossHurricane Katrina XML FOAF 0.1 W3C XHTML 1.0 W3C CSS valid GET Firefox NO Software Patents