Using SSH:

What is SSH?

SSH is a secure protocol variant of Telnet, used to log into your server at the command prompt level from a remote location. Unlike Telnet, it provides strong authentication and secure communications over unsecure channels.

How can I use SSH to access my site?

SSH isn't something that most people have a need for on a day-to-day basis. However, there are times that a site administrator needs to actually run commands on the server that can't be run from FTP or any available web interface. This is where SSH comes in. The first thing you'll need is an SSH client.

The SSH Client:

Probably the most popular SSH client is a small program called Putty. If we had to guess, we would say its popularity is due to the fact that it works great, and is absolutely free. Putty for Windows can be had at the following URL: http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe

  • After downloading and installing, open Putty.
  • Enter your hostname / IP address.

 

  • Next, change the Protocol from Telnet to SSH. Notice the port number, displayed in a box at the side of Hostname / IP address, will change from 23 to 22

 

  • To the left of this screen you will see a menu. Go down the menu to Connection –> SSH. Double click on SSH and change the Preferred SSH protocol version to 2.

 

Click "Open" to log on to your site
Username and password are as found in your welcome email:
Username: user@domain.com <-- the "@domain" part is Important, don't forget it!
Password: your_password

 

Some Basic Unix Commands:

The following is a list of UNIX commands that we found helpful when modifying your web sites on the server. Most UNIX commands have many options and parameters which are not listed here. For more complete information on using UNIX commands, you can refer to the online manual by typing man [command] at the UNIX prompt, where "[command]" represents the command you would like more information about. Other UNIX help commands you can type are [command] -? and [command] --help.

Note: When something is specified in brackets, such as [command] or [filename], it is used to indicate that you must input your desired information here. Do NOT include brackets in your command.

Navigating in UNIX

pwd Shows the full path of the current directory
ls Lists all the files in the current directory
ls -al Lists all files and information
ls -alR Lists all files and information in all subdirectories
ls -alR | more Same as ls -alR, pausing when screen becomes full
ls -alR > filename.txt Same as ls -alR, outputs the results to a file
ls -al /home/usr/bob/ Lists files and information for /home/usr/bob
ls *.html Lists all files ending with .html
cd [directory name] Changes to a new directory
cd .. Changes to directory above current one

Moving, Copying and Deleting Files

mv [old filename] [new filename] Move/rename a file
cp [filename] [new filename] Copies a file
rm [filename] Deletes a file
rm * Deletes all files in current directory
rm *.html Deletes all files ending in .html

Creating, Moving, Copying and Deleting Directories

mkdir [directory name] Creates a new directory
ls -d */ Lists all directories within current directory
cp -r [directory] [new directory] Copies a directory and all files/directories in it
rmdir [directory name] Removes a directory if it is empty
rm -r [directory name] Removes a directory and all files in it

Searching Files and Directories

find . -name [filename] -print Searches for a file starting with current directory
grep [text] [filename] Searches for text within a file