CS 1033 Multimedia and Communications Lab 01: SSH/SFTP and Website “Publishing” 1 INTRODUCTION TO THE COMPUTING ENVIRONMENT: A computer network is a group of computers that are connected to each other. In this course, you will be using two different computer networks: GAUL and UWO. Accessing a computer on one of these networks requires two things: Username Password Each of these networks will have the same username (everything before the @uwo.ca in your email address), but the passwords will be different. Read below for an overview of each network, and details on how to get your passwords – you need this information to complete the labs! GAUL The computers found in the lab rooms (MC-230 and MC-235) are connected to the Computer Science Department’s network, and the network itself called GAUL. These computers contain all the software that you will use in this course, and the rooms themselves are accessed by swiping your student cards in the doorway. These computer labs are accessible 24 hours a day (when the lab room is not in use for course instruction), and after hours access to Middlesex College is available by swiping your student card at the North entrance to Middlesex College (the door closest to the Western Science building). To access these computers, you must login using the GAUL username and password that was sent to your @uwo.ca e-mail when you registered for this course. If you did not receive an e-mail, wait till 2 weeks after the last add date (use the dummy account for this lab and next lab) and then if at the beginning of lab 3, you have still not received the email with your GAUL password, go to the I/O Counter on the 3rd floor in Middlesex College and ask for Bruce Richards; he will assist you in this matter. For further help, please consult your TA. ITS/UWO/”Panther” The second network that we will be using is the UWO network, which is the general network used by all students in the University and maintained by ITS (ITS is now located in Services building on Western Road, near Huron College). This network is connected to all library computers and the General Computing labs (“Genlabs”) scattered throughout the University. The username and password for this network is the same as what you use to check your @uwo.ca e-mail account. FAQ: Why Are We Using Two Networks? We will be using the GAUL network (which is run by the Computer Science Department) to store the files we create during the labs. However, we will be hosting any websites we create on a computer called panther, which is on the UWO network. The reason for this is simple: the GAUL network is not configured to allow you to host webpages that can be accessed from the Internet (for security reasons). By transferring our webpages to panther (which is connected to the Internet), we can allow everyone to be able to see the websites we create (friends, parents, etc.). 2 INTRODUCTION TO S-FTP: Secure File Transfer Protocol (S-FTP) is a Windows-based file transfer (FTP) package which enables users to transfer files between their local computer and a remote server. Some terminology: o o o o hosting – placing website files on a computer that is configured to allow access to those files from the Internet server – a computer that is set up to host websites. In this course, we will be hosting our websites on a computer in ITS called “panther” downloading - copying files from a remote server (such as ‘panther’) to the local PC computer (the computer you are using right now) uploading - copying files from the local PC to the remote server A common use for an ftp (file transfer protocol) package is to obtain files from archive sites, which are servers used to store files. A wide variety of files are available from these sites applications, games, utilities, documentation - some of which include audio, video, and/or graphics. 1. “How To” documents on S-FTP available at: http://www.uwo.ca/its/doc/hdi/infoservices/s-ftp.html 2. Software can be obtained from: http://www.uwo.ca/its/ftp/ Upload Download Your local machine panther.uwo.ca There are two client applications available to you: You will be using SSH Secure File Transfer for most of your labs and assignments. SSH Secure Shell is needed only for Lab 01 to setup up your publish area (where you can publish your website material). You will need two pieces of authentication: 1. UWO username and password 2. GAUL username and password The UWO username and password is the same as what you use to check your @uwo.ca e-mail account. Your GAUL username and password is what you use to log into the computers in MC-230 and MC-235 (which was sent to your @uwo.ca e-mail when you registered for this course). 3 TO CREATE A “Publish Area” ON THE SERVER PANTHER: It creates a folder that will hold the items you want to put on the World Wide Web. THIS STEP ONLY NEEDS TO BE DONEONCE. 1. Start Internet Explorer and go to the following website: http://www.uwo.ca/its/selfServe.html and select the link called: Activate My Personal Web Space. You should then see this: 2. Enter your uwo username and your uwo password and hit the submit button. In a few minutes a special area (really just a folder) will be created. Anything contained in this folder will now appear on the World Wide Web. Thus you can put files into this folder and then see them using IE or Firefox. The name of this folder will be public_html TO ACCESS YOUR GAUL HOME DIRECTORY (Z:\): This is where you will save all the work you do for the labs. The Z:\ is a “network drive”, meaning you can access these files from any computer on the GAUL network. If you had simply saved to the computer you are on right now (the C:\), the only way to access these files would be from the same computer! 1. Open up the explorer window (Simply, just click on My Computer from the Start menu). 2. Go into the Z:\ drive. This is your home directory on GAUL and the place for you to store all your work in the labs. 3. Once you have gone into your Z:\ drive, create a directory called cs1033. This is where you will organize your labs and assignments for the course. 4. Go into the cs1033 directory that you created and then create a directory called lab01. This “subdirectory” is where you will place all your files for the first lab. 4 TO ACCESS THE INSTRUCTOR’S AREA ON GAUL (L:\): This is where the instructors provide you with the material needed to complete the labs. For each lab we will place files containing images, documents, video clips, etc for you to copy to your GAUL home directory and use for the labs. 1. Open up the explorer window (Simply click on My Computer from the Start menu). 2. Go into the L:\ drive. NOTE: IF YOU DO SEE the L:\ drive then just go to step 3 BUT if you DO NOT see a drive labeled as L:\ then you will need to ask your T.A. for instructions on how to map your L drive. (There are instructions at the end of this document). 3. Go into the directory cs1033 and from there copy the needed files and folders. For this lab you will need to copy the lab01 folder from L:\cs1033\lab01\ to Z:\cs1033\lab01\ WORKING ON PANTHER: Now that you are familiar with GAUL, its time to learn how to work with panther (the remote server that will store your completed webpages). The next few pages will describe the essential parts: Connecting with S-FTP and Creating a Folder Since panther is a remote server, you must use SSH Secure File Transfer programs to connect and work on it. Above, by doing the “Activate my Personal Web Site, you created a “publish area” – this is where you will copy your completed websites to display them on the Internet (in other words, “publishing” your websites). Connecting with S-FTP and Creating a Folder: 1. Open SSH Secure File Transfer and select the Quick Connect button. This is the program you will be using to actually transfer your files. 2. Enter panther.uwo.ca in the Host Name field and type in your username in the User Name field. Press Connect. 5 3. Enter your UWO password when prompted 4. Once you see your remote files on SSH Secure File Transfer, double-click the public_html directory (your “publish area”). Note: your public_html directory might contain other things as well – ignore these for now. 5. Right-click inside the remote files area on SSH Secure File Transfer and select New Folder. 6 6. Type cs1033 for the name of the new folder ALL IN LOWER-CASE AND WITH NO SPACES. 7. Right-click on the cs1033 folder and select Properties. This is where you will set up the permissions on your folder to make it viewable by anyone on the Internet (by default, it was probably set up so that only you can view it, for security reasons). 8. Make sure that, at the bottom of the properties window, the Read and Execute columns are all checked for: Owner, Group, and Other. To confirm, the Permissions mode field should read 755. This procedure has made your cs1033 directory readable from your website by anyone. The way to check it on a browser is by redirecting your Internet Explorer to: http://publish.uwo.ca/~username/cs1033/ where “username” is replaced by YOUR OWN username. Note the tilde (“~”) is required as well. Going to this webpage will give you a listing of the files (which is empty for now). If you get a message that looks like the one below then you most likely did not setup your folder permissions properly (as in Step 7 & 8). 7 Note on Permissions Whenever you create a file/folder on panther, or copy a file to panther, it will automatically assume that you do NOT want to share that file/folder on the Internet. So anyone who tries to access it on the Internet will get the “You are not authorized to view this page” error. There are two ways to enable a file or folder to be seen on the Internet, these were shown in: Part [1] Step 6 (using SSH), OR Part [2] Steps 7-8 (using S-FTP) Between the two methods, the first way (typing in “publish”) is much easier, as you can set the permissions for all of your files at once. However, for exam purposes, you should be familiar with BOTH methods. To switch between the SSH and S-FTP programs is actually pretty easy, as they are actually the same program. You can simply click on the icons below to open up a new SSH or S-FTP window, without having to reconnect to panther. Practice doing this, and then move on to the Exercise at the end of the lab. EXERCISE: 1. Make a folder called lab01 on panther INSIDE the cs1033 directory, i.e. make lab01 a subdirectory of cs1033. 2. From the files that you copied from the instructor’s area into your GAUL home directory, there should be a file called picturepage.html and a folder called images/. 3. Rename picturepage.html to index.html. 4. Upload index.html as well as the images/ folder into the lab01 subfolder of cs1033 5. Set up the permissions for the files and folders that you uploaded. DOUBLE CHECK DID YOU SET THE PERMISSIONS ON THE FOLDER(S) TOO?? You can’t do just set the files permissions, YOU MUST DO SET THE FOLDER(S) PERMISSIONS TOO! 6. Go to your website to preview the page. http://publish.uwo.ca/~username/cs1033/lab01 7. Call your TA to check your work and receive your mark for this lab. 8 Setting up your L: drive: (Do this ONLY if you do NOT have an L: drive already on your lab machine) a. Connect a drive from My Computer, click Start, right-click My Computer, and then click Explore. b. To connect a drive from Windows Explorer, right-click Start, and then click Explore. c. On the Tools menu, click Map Network Drive. d. In the Drive box, choose L: e. Next to the Folder box click Browse to find the computer and shared resource that we will need. i.Look for GAUL and expand the list by double-clicking on GAUL. ii.Select Courses and press OK. f. Press Finish to finalize the process . 9