New version page

Montclair CMPT 183 - Study Guide

Documents in this Course
Load more
Upgrade to remove ads
Upgrade to remove ads
Unformatted text preview:

CMPT 183 Lab # 4Objective: At the end of this lab you will be able to- Learn about and use the telnet protocol- Learn about and use the SSH protocol- Learn about and use the FTP protocol- Learn about the HTTP protocol- Create a personal web site directoryLearn about and use the telnet protocolThe telnet protocol should be familiar to everyone by now. This is what we commonly use to gain access to pegasus. Everyone should be accustomed to logging on by now, but it is also possible to telnet to pegasus, while logged currently being logged on to pegasus.Click on the start menu, scroll up to “Run”.Type telnet pegasus.montclair.edu in the box that appears.A window should appear on the screen.Enter your username (lasts name + first digit of your first name).Enter your password (remember we changed this last week!).Once you are logged on to pegasus, type telnet pegasus at the prompt and you should see this:pegasus.montclair.edu% telnet pegasusTrying 130.68.20.55...Connected to pegasus.montclair.edu.Escape character is '^]'.SunOS 5.7 Montclair State University College of Science and Mathematics -- authorized access only --login:Now type your username, and password just like usual. Once you are re-logged in, you can type finger (your username) and see the following:pegasus.montclair.edu% finger zurawskijLogin name: zurawskij In real life: Jason ZurawskiDirectory: /home/students/zurawskij Shell: /bin/cshOn since Jan 29 11:43:46 on pts/4 from pegasus.montclair.eduNo unread mailNo Plan.Login name: zurawskij In real life: Jason ZurawskiDirectory: /home/students/zurawskij Shell: /bin/cshOn since Jan 28 12:44:12 on pts/22 from 130.68.22.220To exit your session type logout as usual. This method can be used to connect to other servers as well, and is one of the most widely used protocols. Learn about and use the SSH protocolThe SSH protocol stands for Secure SHell. This protocol is very similar to telnet, but is much more secure to use and therefore is more widely used. Many machines allow only SSH connections. If you type ssh pegasus you should see this:pegasus.montclair.edu% ssh pegasusThe authenticity of host 'pegasus (130.68.20.55)' can't be established.RSA key fingerprint is 6f:b9:5a:ba:01:10:26:3e:86:01:be:db:cf:07:e8:62.Are you sure you want to continue connecting (yes/no)?You will have to type yes, then you should see:Warning: Permanently added 'pegasus,130.68.20.55' (RSA) to the list of known [email protected]'s password:Now type your password just like usual. All of the same commands can be used as in telnet. Note that many Windows machines do not support SSH, unless they have a program (such as puTTY). Asa side note there are now instructions on installing and using SSH at this location:http://www.csam.montclair.edu/~zurawskij/cmpt183/SSH.htmlIt is recommended that everyone follow these steps and install SSH at home.To exit your session type logout as usual. Learn about and use the FTP protocolFTP stands for File Transfer Protocol. This is a very useful tool for transferring files from computer to computer. There are many different methods of using this protocol, everything from usingit in a web browser (like Internet Explorer), a separate FTP program (Cute FTP, WS FTP, SFTP [from SSH]), or command line like I will show you today. The benefit of this way is that almost every computer in the world offers this way toFTP files.Click on the start menu, scroll up to “Run”.Type ftp pegasus.montclair.edu in the box that appears.A window should appear on the screen and should look like this:Connected to pegasus.montclair.edu.220 pegasus.montclair.edu FTP server (SunOS 5.7) ready.User (pegasus.montclair.edu:(none)):Enter your username (lasts name + first digit of your first name).Enter your password (remember we changed this last week!).After that you should see this:Connected to pegasus.montclair.edu.220 pegasus.montclair.edu FTP server (SunOS 5.7) ready.User (pegasus.montclair.edu:(none)): zurawskij331 Password required for zurawskij.Password:230 User zurawskij logged in.ftp>The ftp> prompt is just like the prompt we have when using telnet. This prompt can be used to accept certain commands as well. There are several important commands to remember:lcd: This displays the LOCAL (the computer you are sitting at) current directory.put: This takes a file LOCALLY, and places it REMOTELY (pegasus).get: This takes a file REMOTELY, and places it LOCALLY.cd: This works just like the UNIX command, it lets you change the current directory to whatever you want.dir: This works just like the UNIX command, it displays a directory.pwd: This works just like the UNIX command, it displays the REMOTE current directory.help: Display this to see a list of commands.Type:lcd “c:\documents and settings\student\my documents”This allows you to change your LOCAL directory to this folder.Type pwd to see the following:ftp> pwd257 "/home/students/zurawskij" is current directory.To get a REMOTE file and place it LOCALLY type get HelloWorld.java, you should see this:ftp> get HelloWorld.java200 PORT command successful.150 Binary data connection for HelloWorld.java (130.68.22.220,1403) (210 bytes).226 Binary Transfer complete.ftp: 210 bytes received in 0.00Seconds 210000.00Kbytes/sec.ftp>If you look on your computer in the directory that lcd specified you should see the HelloWorld.java file. To place a LOCAL file onto a REMOTE machine type put HelloWorld.java, youshould see this:ftp> put HelloWorld.java200 PORT command successful.150 Binary data connection for HelloWorld.java (130.68.22.220,1404).226 Transfer complete.ftp: 210 bytes sent in 0.01Seconds 21.00Kbytes/sec.ftp>For those out there that wish to work on a project on their home computers, or perhapsprint something out at home this is the way to do it. To exit the ftp program, simply type bye and you should see this:ftp>byeGoodbye!Learn about the HTTP protocolAnyone who has ever used a web browser may notice that http:// appears right before most web site names. This little acronym stands for HyperText Transfer Protocol. This basically means that what you view through a web browser is formatted to look nice, or to perform an eye catching display.Web pages are commonly written in HTML, which is HyperText Markup Language. HTML is very similar to JAVA, it is a list of instructions for the web browser to read, so the text you are reading stands out, or does something special.


View Full Document
Download Study Guide
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Study Guide and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Study Guide 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?