Telnet Basics:

Telnet is an internet protocol that allows you to connect remotely to a computer and use that computer as if you were physically in front of it. What we're doing is actually something called "Secure Shell" or "SSH". It's the same basic interface as the old telnet protocol which is why I still frequently refer to it as 'telnet'.

You need a telnet/ssh client to connect into a server. A telnet/ssh client is simply a program that acts as the interface to the computer you are remotely connected to via the telnet or ssh port. There are many different client programs just like there are many different browsers that allow you to connect to the WWW. Windows already has a telnet client that comes with its operating system, but a more user friendly option is a free program called PuTTy. You can download it for free on the Internet. It is small enough to run off of a floppy disk so there is not even a need to install it anywhere.

Download Putty

To make a telnet/ssh connection, start PuTTY by double clicking its icon. You will then need to login to the screen:

telnet picture

As you can see in the picture above, there is a textbox that is asking for the HOST NAME or IP ADDRESS (circled in pink). That is where you type the domain name of the computer that you want to connect to. In this case you will type: power.arc.losrios.edu

Then hit OPEN.

telnet picture

You will then be asked to login with your user name, followed by your password. Remember that you must hit the enter key after entering information or nothing will happen.

Your username is your lastname and the first initial. Your password is your studentid number.

So if my name was Mary Apple, and my studentid number was 1234567 I would use this:

username: applem password: 1234567

Note: your password will not appear on the screen as you type it.

When you hit enter you should see this:

telnet picture

Look at the green square in the image above. The line before the green square says:

applem@power:~$

This is the name of the account I am connected to and it indicates I am at the top of my directory tree.

From here, you'll probably want to see where you are and what other directories are available to you in your main account. To see a directory listing, type:

ls Or ls -l

The command (ls) will give you a shorter version of the listing. The command (ls -l) or (ls -la) gives you more detailed information. Below I typed 'ls' and it shows that I have a folder called public_html in my directory -- the yellow arrow is pointing to it.

telnet picture

This is a look at the longer listing by typing 'ls -l'. Now the public_html is listed on the right side of the screen (yellow arrow) with a lot of other information to the left of it.

telnet picture

That public_html folder is my 'web' folder. Every web server has a web specific folder -- a folder where files listed are open to the internet. Sometimes the web folder is down several directories; sometimes it's listed right at the top. We can open the folder and look inside it by typing:

cd public_html (hit enter) ls -l (hit enter) telnet picture

The yellow arrow is pointing to the first command I typed. The green arrow is pointing to the second command I typed. The lavender circle is showing the two items in this folder (cisw300, and index.pl). The orange arrow is showing an indicator to tell me if the item is a directory or a file. If there is a 'd' in front (like with cisw300) it is a directory. If there is a dash in front - (like with index.pl) that indicates it's a file.

Our web server is being used by many students taking different web classes. To keep the classes separate, folders were set up using the class file name. If you are in more than one web class, you will probably see more than one folder such as: cisw300, cisw310, cisw400. You will be using those folders for your individual classes.

Ignore the file called 'index.pl'.

ANYTHING you want to publish to the web must go into one of those folder. The public_html folder is locked so you can't add any files to it. But the class folders are waiting for you to build your web pages.

 

First we must open our folder (cisw300). To do this we will type:

cd cisw300 (hit enter)

And then to see what is in the folder:

ls -l (hit enter) telnet picture

The orange circle is circling the commands I typed. The green arrow is pointing to the single file sitting in this directory: index.html

Notice the green square again. Now it says:

applem@power:~/public_html/cis300$

This tells me I'm in the public_html folder and the cisw300 folder. I can always tell where I am by looking at this.

The index.html file is the default 'home' page of my web site. If I want to edit this file, I must open up a text editor. Just like a Windows machine has a text editor called "Notepad", the Power Server has a text editor called "Pico". To open my file in Pico, I type:

pico index.html (hit enter) telnet picture

When I hit ENTER this time, it will immediately take me into the index file in edit mode.

telnet picture

I can now edit this file. Notice there are series of commands at the bottom of the screen. These commands all have a ^ followed by a Letter before them. The ^ indicates that you must hold the CONTROL key down before hitting the letter. The command WRITE OUT is how you SAVE. I'm going to make a change to my file and save it.

telnet picture

I used the arrow keys to move my cursor down and wrote the words "Starting Construction" (green arrow). You MUST use the ARROW keys to navigate. The mouse DOES NOT work like it does on a windows machine.

As soon as I finished typing my change, I hit CONTROL o to write out. Notice that the words: File Name to write: index.html appears down at the bottom of the screen followed by my GREEN prompt (pink arrow). If I wish to save this file by writing over the other original file, all I have to do is hit enter. If I wish to save this file under a new file name, all I have to do is delete "index.html" and type a new name, then hit ENTER.

I'm just going to hit ENTER to save. If I'm then done with my changes, I can hit CONTROL x to exit the editor. I will be taken directly back to my Command Prompt outside of the file. (If you're not done editing the file -- don't bother exiting. Just leave the file open and finish your work.)

telnet picture

Notice that the GREEN square is still beside the word public_html/cisw300 indicating that I am still inside that folder.

Create A NEW FILE:

If I would like to create a brand new file now, all I have to do is type pico followed by a file name:

pico file1.html

Pico will open up a brand new blank document which I can start editing.

telnet picture

You can see by the name of the file that appears on the gray bar just below the blue bar, that I'm editing a file named 'file1.html'. Don't forget to save the file before exiting.

After you create your file (or edit your index page) go look at it in a browser to see how it looks. You can leave your telnet window open and just open a browser window. You will need to tell the browser which URL to go to. Your page URL will look something like this:

http://power.arc.losrios.edu/~applem/cisw300/index.html

. . .where applem is your actual username, and cisw300 is the name of the folder you were using, and index.html is the name of the file you want to look at.

TELNET EXTRAS:

ARROW KEYS: You use these for navigating within the text editor. The MOUSE does NOT work. The up and down arrow keys on your keyboard will also cycle back and forth through previous commands you typed. You can save yourself from having to type the same things over and over again. Play around with them to see what they do.

TAB KEY. If you start to type a file name or a directory name---get the first few letters typed and then hit the tab button---the rest of the name will automatically appear. This will save you some typing.

WILD CARD: You can type a partial directory name followed by an asterisks when changing directories. This won't work when opening files.

Basic commands: all the following commands must be typed as is, then hit ENTER.

Inside PICO:
Control O (will save your changes)
Control X (will exit the editor)
Control K (will cut to the end of the line)
Control U (will paste the line just cut)

 

NOTE: BEWARE THE MOUSE!!!! The mouse is not generally used in telnet. Using it to try and move around or scroll through the screen will often mess up the page.

 

Home