How to SSH to a Unix Machine

Even though you might be working on a PC, at some point of time, you might need to interface to a Unix Machine. You might be doing this now without knowing it! For eg. checking email on your  Math account or accessing this webpage which is on the Math server, a Unix machine!

Here is a brief introduction to access your account on the Math server. The same information can be used for any other Unix machine, provided of course you are a valid user on that system.

What you need ?

  • An account on (i.e. you should know your login name and password. These are the same ones that you use to check your email.)
  • Secure Shell program on your PC.

Lets begin...

Double click on the 'SSH' icon. This will bring up a SSH window. On the SSH Window select 'CONNECT'. This should pop up a small window where you need to give the following information: 

Host Name:

User Name: xxxx (where 'xxxx' is your login name.)

Port Number: 2200

Authentication Method: password 

(Most probably you need to supply just the Hostname and User Name fields since the other two fields are usually the default values.)  Press the 'CONNECT' Button. Now the PC will try to connect to the unix server (in this case Math server) via the network. Before the unix machine lets you use its resources it needs to verify that you are a valid user on the system, therefore it asks you for your password. Enter that on the password prompts respectively. If the unix machine is able to authenticate you then it displays a welcome message and stops at the following prompt:


You have now successfully logged into the Math server.

If you were already on a unix machine, then you need to type in the following command at the command prompt of your terminal.

ssh -p 2200 <login_name>

So what can you do now ?

Well you can run some basic commands like:

  1. ls : this is analagous to the 'dir' command on DOS. ie. it shows you the contents of you home Directory.
  2. pwd : Shows you the current directory. When you first login you are in your home directory.
  3. pine : lets you check your email on math.
  4. cd dir_name : Changes your current directory to dir_name.
  5. more file_name : see the contents of the file called file_name.
  6. vi file_name : Create,view or edit a file named file_name. [See Vi Tutorial]
  7. mkdir dir_name : Creates a new directory named dir_name.

For now try this:  telnet to math and logon and at the prompt type

  1. pwd [displays your home directory]
  2. ls [displays contents of your home directory]
  3. cd public_html [changes directory to the directory where all your homepage files are kept]
  4. pwd [displays the path to the public_html directory]
  5. ls [displays contents of the public_html directory]
  6. more index.html [if you have a working home page then this file (or math.html) should exist]