SSH/Telnet
Access
Chapter 4
ExpertInternetServices.com offers the secure form of telnet known as SSH for most of it's hosting packages. This allows us to provide extra security to our web servers, which in turn provides our clients with the best possible performance. Please check here to see if your package allows for this secure method of telnet access.
In order for us to authorize SSH access for your account you will have to email a scan of a written and signed request together with an official picture id of the account owner as well as any users that will be accessing your account. This allows us to provide extra security to our web servers, which in turn provides our clients with the best possible performance. The email address is "sshaccess@eiswebhost.com"
Before SSH can be used please make sure that either a RSA Key has been created or a Class B IP or Class C IP has been entered through your WebSite Manager. Click here if you need to complete these steps.
You may download SSH software at:
FREE:
COMMERCIAL:
There are many other sources for SSH telnet software and any will work.
What is Secure Shell (SSH)?
When you SSH to your domain, you are controlling it, using the operating system of the server. Any commands you enter are run on the server (not your local PC) and operate according to the command parameters on the server.
Secure Shell (SSH) provides a command line interface that lets you run commands to modify the contents of your web site It encrypts all the data sent and received, providing a high level of security.
The following is a list of UNIX commands that we found helpful when modifying 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.
Note 2 : Only use lower-case letters. UNIX is case sensitive.
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 sub-directories |
| 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 |
File and Directory Permissions
There are three levels of file permissions; read, write, and execute. In addition, there are three groups to which you can assign permissions; file owner, user group, and everyone.
The command chmod followed by three numbers is used to change permissions. The first number is the permission for the owner, the second for the group and the third for everyone. Here are how the levels of permission translate:
| 0 = --- | No permission |
| 1 = --x | Execute only |
| 2 = -w- | Write only |
| 3 = -wx | Write and execute |
| 4 = r-- | Read only |
| 5 = r-x | Read and execute |
| 6 = rw- | Read and write |
| 7 = rwx | Read, write and execute |
It is preferred that the group always have permission of 0. This prevents other users on the server from browsing files via FTP. Here are the most common file permissions used:
| chmod 604 [filename] | Minimum permissions for HTML file |
| chmod 705 [directory name] | Minimum permissions for directories |
| chmod 755 [filename] | Minimum permissions for scripts & programs |
| chmod 606 [filename] | Permissions for data files used by scripts |
| chmod 703 [directory name] | Write-only permissions for public FTP uploading |
Putty is a free implementation of SSH for Windows. You can find more information about it at http://www.chiark.greenend.org.uk/~sgtatham/putty.
1. Download Putty from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html and place it in your Windows desktop.
2. Double click on the putty.exe icon and a you
will see this:

3. Type your hostname on the "Host
Name" field and select "SSH" as your "Protocol"
4. Click on "Open" and you will see this:

4. Select "Yes" and you will see:

5. Enter the "username" assigned to your account and press the Enter key.
6. Enter the "password" (you will not see it as your type it) and press Enter again. You will see:
You are now logged into your account.
You can begin running commands at the "$" prompt.
What is SecureCRT?
SecureCRT is a premiere SSH client that is widely used. You can find out more information about it on http://www.vandyke.com/download/securecrt/.
2. Install the program and run it, if its the first
time you use it, you will see this:

3. Click "OK" and you will see this:

4. Click on "I Agree" and you will see:

5. Removed the check and select "No". You will then see:

6. Select ssh1 for your "Protocol".
7. Type your domain name in the "Hostname" field.
8. Type your username in the "Username" field.
9. Click on "Connect" and you will see:

10. Click on "Accept & Save" and you will see:

11. Enter the password assigned to you.
12. Click on "OK" and you will see:
You are now logged into your account.
You can begin running commands at the "$" prompt.
There are several different SSH clients for the Macintosh platform. The two most popular are Nifty Telnet and Better Telnet. Both can be found by doing a search at tucows.com.