Making Money | Hosting Support | Dial-up Support | Contact | Search | Free Web Redirection                    Help

Advertise Here 

Telnet
HTML
FTP
Telnet
CGI

Telnet Tutorial



What is Telnet?

Telnet is a protocol most often used to connect to a UNIX system because of its command line interface. Telnet is a very useful protocol when properly used but lacks graphical user interface.

Telnet has a number of advantages over FTP including the avility to chat with users, pinpoint problems in CGI scripts, delete directories if it is not empty, and editing of files without downloading them from the server.



Telnet clients we recommend for use.

We reccommend a program called CRT Telnet by
VanDyke Technologies. You can download CRT Telnet from our FTP site or from VanDyke Technologies. Below are FTP download sites:

Windows 95 comes with a telnet program, Windows Telnet. This program can be accessed by pressing the Start button on the menu bar of the desktop, then Run... Now type in "telnet" in the textbox and Windows Telnet should appear as a plain white window.



Connecting to the yourdomain.com server.

Connecting to yourdomain.com via telnet is simple. The hostname is "yourdomain.com". In the telnet window of CRT or Windows telnet, you will then be prompted for your login and password. Once you enter this information and the server verifies this information, you will be logged into the root (/home/your_login) of your account.



Basic Telnet commands for beginners.

Telnet comes with a large number of commands that cannot all be discussed in this brief tutorial. Below we attempt to address basic telnet commands.

Command

What this command does....
ls This command will list all of the files and directories within the current directory.

cd <directory> This command will change your current directory to the directroy you specify. An example would be that "cd public_html" would take you into your public_html directory.

mv <filename> <location> This command will move a file from its current location within the current directory to the directory you specify. For example, lets say you are in your public_html directory and you want to move the file "links.cgi" into your "cgi-local" directory. At the prompt type "mv links.cgi cgi-local.

chmod XXX <filename or directory> This command will set the permissions on a file or directory to whatever you specify. The "XXX" would be replaced by actual numbers, such as 644. For example, if we wanted to set the permissions on our links.cgi file in our cgi-local directory, we would first go into that directory then type "chmod 755 links.cgi" at the prompt.

rm <filename or directory> This command will delete the filename or directory you specify in the current directory. If we wanted to remove the directory named "user", we would type "rm user" at the prompt.

man <command> This is one of the most helpful commands for new users. It allows you to see all of the different options for a particular command. For example, if were were to type "man ls", we would then see all of the different options available for the list (ls) command.

traceroute <domain> This command will perform a traceroute on a particular virtual domain to see how many hops it takes to get from your location to the domain specified. An example would be "traceroute yahoo.com", which would show us how long it takes for packets to get to yahoo.com and how they get there.

whois <domain> This command will display the current InterNIC record including administrative, technical, and billing contact for a particular domain if it is already owned.




Using PICO and PINE in Telnet.

Pico is a very basic editor used it Telnet. Although basic, it is very useful in that you can edit your HTML files, CGI scripts, and any other ASCII files without downloading them from the server, making the changes, then uploading them once again.

Pico is used in the following manner: type in "pico <filename>" at the prompt. For example, lets say we wanted to edit a line in our links.cgi file. We would need to get into the directory where that file resides and type in "pico links.cgi" at the prompt. Now a screen would appear with our links.cgi file.

Once you are finished making the changes to a file, press <Ctrl><X> at the same time. Pico will ask you if you wish to "Save modified buffer" (in plain English, save the changes). Type "y" if you want the changes saved or "n" if you want the changes ignored. If you typed in "y" it will then ask you "File name to write:", which means the file name to save the changes to; the default value is the file we originally edited (in this case, links.cgi). So you can save the changed file to a different name.

For more information on Pico, visit the following URL:

http://www-scf.usc.edu/~ellars/pico.html


Pine is a basic e-mail client that allows you to read your e-mail while in Telnet. Simply type in "pine" to go to the main menu of Pine. You will see a menu of options, check the "inbox" of your mail by typing "i" at the main menu. Then use your arrow keys to scroll up and down to new and old messages, press <Enter> to read messages.

There is a menu of options at the bottom of the screen. Use this menu to navigate your way around Pine. More information regarding Pine can be found at the following URL:

http://w3.aces.uiuc.edu/AIM/scale/pine.html



Talking to other users on Telnet.

Talking to other users on telnet is always possible, unlike FTP. The command "f", which stands for finger, will display all of the users currently in Telnet. Other information, including logins, the users real name, and number of minutes idle is also listed.

To talk to any user on the system, just type "talk login" where login is the acutal login of the user you want to talk to. If the user accepts you chat request, a divided screen will appear and you two will be able to chat.



Testing your CGI scripts through Telnet.

One of the most powerful features of Telnet is that you can pinpoint problems in your CGI scripts. Unlike the HTTPD protocol which displays the infamous "Internal Server Error" message, telnet will tell you what is the real problem!

To test your script, you must execute it on the server which means your permissions must allow you (the user) to execute the script. Otherwise, a permission denied message will occur.

Go into the directory where the script you wish to test resides. Lets say that the CGI script named "links.cgi" is giving us problems! To find the problem, type in "./links.cgi". The server will then execute the script and tell you what, if any problems occur. The syntax for this command is "./script_name".

After you have found the problem, you can edit your CGI script using PICO in Telnet, then test it again. Eventually you will get your script working, and much faster than trying to pinpoint the problem yourself!


 
[Home] [Hosting] [Dial-up] [Redirection] [Free Stuff] [Shopping]