How to install puTTY for SSH access + basic commands

1)   First download the puTTY client by visiting: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

 

Note: there are various versions with multi functions. For most people puTTY.exe (first one listed) is the one you want.

 

2)   Once the file has been download, double click the EXE file. PuTTY will automatically launch the main configuration (no installation is required)

 

 

 

 

3)   Enter the hostname or IP address of your account. Port 22 is the default, so leave it as-is. Unless your host provider specifically states a different port number. “Connection Type” defaults to SSH which is what we want for this tutorial.

 

 

 

4)   The basic information is now complete. You can now press “Open” button.

 

Optionally: You can enter a name under “saved sessions” and click save. So you don’t have to keep typing the information each time.

 

A dialogue will open & connect to the server. If successful you should see a prompt like the following. From here you can navigate through & make changes to your account.

 

 

 

In the following section I will outline and describe some basic unix commands for navigating and viewing files.

 

ls (that’s an L)useful flags: -a: lists all files including hidden files/directories lists files in the current directory
cd [directory name] change or goto directory
passwd [enter new password] change the password for the current logged in user. This is the recommended way to change the password for a VPS
cat [file name] allows you to view the content of a file
vi or nano [file name] a basic text editor. Useful for editing files.

 

The ls command is used to view files in the directory you are currently in:

 

 

 

The –A flag for the ls command is particularly useful for viewing system files or folders. For example I created a file and marked it as hidden as seen below (last file in the list)

 

 

 

To change directories you use the cd command. The unix file system is somewhat different to that of Windows. The top most directory is known as root or represented by a /. To get to root you type:  cd / , then you could issue an ls to see all the content. To move back up one directory use: cd ..

 

 

 

Apart from the root directory. Some other good ones to know are home or /home. Which by default on linux will hold all the files for each user account you may have. The full path would be: /home/Richard. If I wanted to get to that directory I could type either: cd /home , then cd Richard. Once you know the folder structure typing: cd /home/Richard is quicker.

 

 

 

On OS X systems: home folders are located under: /Users as seen above

 

Next is /var . Which is typically where the various system logs are stored.

 

Passwd: This command is used to change the password of the current user. At a prompt type: passwd then the new password that you wish to use. You may be prompted to type the old password.

Cat: The cat command is very handy for viewing the content of files. You simply type: cat [filename]. Note: some files won’t view very well. But for configuration files, system logs or plain text. The cat command works extremely well.

 

If you wish to make configuration file changes, or write files. Most unix type OSes have a basic editor usually either vi or nano. These are much like the old editor in DOS. You simply type: nano script.sh for example. In some cases only the root user is allowed to save changes especially to system files. In which case you’d use the sudo command i.e nano script.sh. Which will prompt you for the root password. This will allow you to act as the super user (root). Even if you are logged in to a standard account.

 

 

 

The unix file structure may seem confusing at first. Especially coming from Windows. If you take time to browse around using the LS command. You should find after a week or so. The structure isn’t so foreign & is quite logical.

For more information, there are many good sites dedicated to unix commands and navigating around. One is my favorites is: http://linuxcommand.org/index.php

 

 

Leave a Comment