If you have a dedicated server, a VPS, or a more expensive shared hosting plan, they likely support Secure Shell (SSH) connections. SSH is a secure shell system; it encrypts data between a client and server. SSH encrypts all traffic, including passwords, typed text, X graphics, etc. It is meant to be a drop-in replacement for both telnet and rsh.
In order to connect to your server via SSH, you will have to install an SSH client on your computer. We recommend the following SSH clients:
Other clients for Windows, Mac, and other operating systems are listed at http://www.openssh.com.
What is SSH?
SSH was one of the first tools built by the architects of the Internet so that resources could be shared easily.
SSH is the means to connect directly to your web server. What this means is that you, from your computer at home or work, can log-on to your hosting server and utilize the software programs or data files located there. An easy way to visualize this is to think of your keyboard directly attached to a distant computer and not to your local computer.
How to SSH Into a Server?
These instructions are valid if you are using a UNIX-based system (Linux or Mac). You can check out the Putty guide to find out how to do it in Windows.
Let’s connect to the server:
You can replace example.com with an ip address if that is what you have. If this is the first time you connect to this host, you will be asked if you trust the authenticity of it. Type
yes to continue and add it to your known hosts (
~/.ssh/known_hosts). The next time you connect to the host you will not be asked about it.
The next step is authentication. The most common and least secure method is password authentication. You have to type in your password.
I strongly discourage the use of password authentication. If you check your logs, you will see non-stop brute-force attacks. More secure options are 2-factor authentication and key-based authentication.
It’s also likely that your username on the server is different that the username on your local computer. SSH uses your username on your local system to log in on the remote system. To change that use:
You can also specify a custom port (other than the default 22) by adding
-p <portnumber> in the command.
What can I do in SSH?
Similar in appearance to the Windows DOS prompt, you can type in commands (yes, TYPE in commands – no clicking allowed here) to perform specific functions. The most commonly used commands are simple and easy to remember. There are several functions that you may wish to perform, such as untarring (unzipping) files, moving entire directories from one location to another, deleting files or entire directories, etc.
In general, SSH provides a pretty complete POSIX environment. You access these programs by typing in their names and then following commands relevant to each program. If you need help with any of the programs, at the shell prompt, type man and the name of the program (e.g., man ssh to get instructions for that program online).
SSH is CaSe SeNsItIvE!
It is important to remember that Unix is case-sensitive, and that “Index.htm” is not the same as “index.htm.” This also holds true for your account passwords.
Do I HAVE to use SSH?
Most of the functions you can perform in SSH, you can perform using other tools as well. For example, you can edit your redirect file and permissions either in SSH or from your control panel. It’s your choice – just use what you’re comfortable with.
Some Basic UNIX Commands
The following are some basic commands that will help you become acquainted with the UNIX environment:
ls: Lists the contents of your directory.
ls -a: Lists all files in the directory, including hidden files (hidden files begin with a “.” (e.g., .htaccess.)
cd: Changes the directory. For example, to move from your “root” or “home” directory to your “www” directory, type the command,
cd www; to move up one level (e.g., from your “www” directory back to your “root” directory), type
cp: Copy a file. Syntax is
cp <sourcefile> <destinationfile>.
mv: Move a file, or rename a file. Syntax is
mv <source> <target>.
rm: Remove, or delete, a file. Syntax is
rm <filename>. NOTE: Use this command carefully – there is no UNDO command in UNIX.
mkdir: Creates a directory. Usage is
rmdir: Remove or delete a directory. Syntax:
pwd: Returns the system path to the current working directory. Useful not only when you’re lost, but when you need the correct system path for files, etc.