% Author: Ian! D. Allen - idallen@idallen.ca - www.idallen.com % Date: Winter 2011 - January to April 2011 - Updated 2011-03-26 07:13 EDT % Title: The Course Linux Server - idallen-alinux - [Course Home Page] - [Course Outline] - [All Weeks] - [Plain Text] Problem Reporting for the Course Linux Server ============================================= Any issues you have regarding the Course Linux Server must be dealt with *only* through your instructor. Neither Algonquin ITS nor the Help Desk know anything about this Linux machine. All issues, including password resetting, must be resolved directly with your instructor. **This machine does not use your Algonquin network password.** Your instructor can tell you your special Linux Server password. Here’s how to [Report Problems] well. Access to the Course Linux Server ================================= The Course Linux Server `idallen-alinux` is located behind an Algonquin College firewall but has some limited access from the Public Internet. It is an Intel Pentium 4 2.4Ghz with 1GB of memory runing GNU/Linux Ubuntu 10.10 with an Apache web server. The Course Linux Server has two public ports, one HTTP and one SSH, mapped through a Public gateway machine `cst8281.idallen.ca`. This gateway machine and these two ports are visible anywhere on the Internet, giving you limited access to the machine without needing to use the VPN. HTTP Access to the Course Linux Server ====================================== For information on setting up your own personal web directory on the Course Linux Server see the section on [Your Personal Web Directory] below. HTTP via Public gateway cst8281.idallen.ca and special port 8080 ---------------------------------------------------------------- - Public URL: (note the special 8080 port number) This Public gateway address is the best way to browse your web pages and validate the HTML and CSS. Only the Public URL works for validating your web pages and CSS sheets for errors. Use this Public URL for all your validation activities. HTTP via Private IP 10.50.254.148 or idallen-alinux-alg.dyndns.org ------------------------------------------------------------------ If the Public gateway machine is down or unreachable, you will have to use the Private IP address that only works On-Campus or through the College VPN. You cannot validate web pages or CSS using the Private IP address, but you can log in, browse pages, and transfer files. You can use the Algonquin VPN to access the Course Linux Server remotely using its Private IP address `10.50.254.148`, but you cannot use this Private address to validate pages for HTML and CSS errors. *(ITS has on-line help for the VPN; search for VPN on the [College Home Page].)* - Private URL: (Private IP, using default port 80) The DNS name `idallen-alinux-alg.dyndns.org` also resolves to the private IP address (above), but note that any typing errors you make in the host name “`dyndns`” (e.g. `dnydns` or `dynndns`) will connect you to a cracker Phishing site that will capture your password and compromise your account and all your files. Use the IP address, or don’t make any typing mistakes in the name! Note the letter “`a`” in “`idallen-alinux`”. - Private URL: (Private IP, using default port 80) Logging in to the Course Linux Server using SSH =============================================== You can log in to the Course Linux Server using SSH and you can transfer files using programs such as SFTP or SCP that are variations of SSH. On your first SSH/SFTP/SCP login connection, you will be asked to accept the Course Linux Server encryption key. Say “`YES`”. Login using your usual Algonquin userid and your special Linux password. **This machine does not use your Algonquin network password.** Your instructor can tell you your special Course Linux Server password. If you need your password reset, see your instructor; do not go to ITS. Log in via SSH from Unix/Linux, Mac OSX, and Cygwin --------------------------------------------------- To login to the Course Linux Server from the shell prompt at another Unix machine (including from Fedora, Ubuntu, Knoppix, from a Macintosh OSX Terminal, or from Windows Cygwin), use a SSH command similar to the ones below, but be sure to use your own Algonquin userid. Replace the userid `abcd0001`, below, with your usual Algonquin userid. Make sure the login banner says **course linux server**. On your first connection, you will be asked to accept the server encryption key. Say “YES”. Login using your usual Algonquin userid and your special Linux Server password. **The Course Linux Server does not use your Algonquin network password.** Your instructor can tell you your special Linux Server password. If you need your password reset, see your instructor; do not go to ITS. Apple Mac OSX systems have a `terminal` program that lets you use the command lines below. The Windows Cygwin environment has a Bash shell that gives access to the same standard *ssh* command. ### SSH Via Public gateway cst8281.idallen.ca and special port 2222 $ ssh -p 2222 abcd0001@cst8281.idallen.ca *** COURSE LINUX SERVER idallen@idallen.ca *** abcd0001@cst8281.idallen.ca's password: ...answer yes to accept the host key, if asked... ...enter your special Course Linux Server password... If you forget the `-p 2222` port option, you will try to log in to the Public gateway machine itself, and you will be rejected. Remember to use the port option to reach the Course Linux Server. Make sure the login banner says **course linux server**. ### SSH Via VPN or On-Campus via 10.50.254.148 or idallen-alinux-alg.dyndns.org $ ssh abcd0001@10.50.254.148 *** COURSE LINUX SERVER idallen@idallen.ca *** abcd0001@10.50.254.148's password: or $ ssh abcd0001@idallen-alinux-alg.dyndns.org *** COURSE LINUX SERVER idallen@idallen.ca *** abcd0001@10.50.254.148's password: ...answer yes to accept the host key, if asked... ...enter your special Course Linux Server password... Do *not* use any special port option to log in using the Private IP address. Make sure the login banner says **course linux server**. Log in via SSH from Windows using PuTTY --------------------------------------- If you use Windows (e.g. in Algonquin Microsoft labs), you can use the free PuTTY program (or other SSH-capable program) to connect to the server using the SSH protocol. (In some labs you may have to do a Google search for “PuTTY download” and download `putty.exe` first.) Replace the userid `abcd0001`, below, with your usual Algonquin userid. On your first connection, you will be asked to accept the server encryption key. Say “YES”. Login using your usual Algonquin userid and your special Linux Server password. **The Course Linux Server does not use your Algonquin network password.** Your instructor can tell you your special Linux Server password. If you need your password reset, see your instructor; do not go to ITS. Make sure the login banner says **course linux server**. ### PuTTY Configuration options for Windows users *Before* you connect using PuTTY, you should set up the following two separate PuTTY Configuration sessions (two different hosts and ports, **A** and **B** below) and save them each (separately) under **Session** as a PuTTY *Saved Session* so you can use them each again later without having to set them up again: PuTTY Configuration dialog box: Session: Host Name (or IP address) and Port: A. Public Internet: cst8281.idallen.ca and port 2222 B. VPN or On-Campus: 10.50.254.148 and port 22 (default) Connection type: SSH (set to SSH *before* you set the Port) Window: Rows: 44 (or choose whatever fits on your screen) Connection: Seconds between keepalives: 55 Disable Nagle's algorithm: ON Enable TCP keepalives: ON Internet protocol version: IPv4 - **Session A:** Use the special port 2222 when connecting via the Public gateway `cst8281.idallen.ca`. Under **Session**, enter a *Saved Session* name and save this session for later use. Always set the *Connection type* before you set the *Port* number. - **Session B:** Use the default port 22 when connecting via the Private IP `10.50.254.148`. Under **Session**, enter a *Saved Session* name and save this session for later use. - You may use the name `idallen-alinux-alg.dyndns.org` instead of the private IP address `10.50.254.148`. File Transfer to/from the Course Linux Server ============================================= The Course Linux Server supports only secure SCP/SFTP-style file transfers, based on the secure SSH protocol. The server does not have the old insecure FTP protocol installed. The Class Notes file [570_file_transfer] has the details for file transfer between Linux, Windows, Mac OSX, and Cygwin systems. Your Personal Web Directory - public_html ========================================= If you create a directory named “`public_html`” in the home directory of your account, and make it readable and searchable by “others” (the default), any publicly readable files you put there will be visible to the web server and anything inside that `public_html` directory can be browsed (e.g. in Firefox) via either of these two URLs: http://cst8281.idallen.ca:8080/~abcd0001/ (Public Internet) http://10.50.254.148/~abcd0001/ (PRIVATE IP) Replace abcd0001 by your account userid. There is a tilde character preceding the account userid, above. For example, for userid **alleni**: The first URL above uses the Public gateway `cst8281.idallen.ca:8080` and will work to see your web pages from anywhere on the Internet. You can send this first link to your family. Don’t forget the 8080 port number! You can only validate your HTML and CSS pages for errors using the Public gateway URLs. The private `10.50.254.148` address above only works when you are on-campus at Algonquin College or using the VPN. Don’t use it unless the public address above is not working. You cannot validate any web pages using the private address. Use the public address instead. Note that the `public_html` directory does not appear in the URL; it is added by the web server when you specify a leading tilde in front of the account name in the URL. The URL component `/~abcd0001/` is expanded by the web server to look in Linux path “`~abcd0001/public_html/`”, and Linux expands the leading “`~abcd0001`” to be the home directory of the abcd0001 account, which is usually `/home/abcd0001`. So URL path `/~abcd0001/` usually expands to be Linux path `/home/abcd0001/public_html/`. Example: the Unix/Linux file path `~abcd0001/public_html/one/two.txt` (i.e. `/home/abcd0001/public_html/one/two.txt`) can be found at either of these URLs (note how `public_html` does not appear in the URL): http://cst8281.idallen.ca:8080/~abcd0001/one/two.txt (Public Internet) http://10.50.254.148/~abcd0001/one/two.txt (PRIVATE IP) You do not specify the “`public_html`” directory in the URL; it is assumed automatically by the web browser. You do need to remember to use “`public_html`” in your pathnames when actually copying files to/from the Course Linux Server. (The web server only looks at web pages that you keep in your `public_html` directory.) Only directories and files under `public_html` that have public access for “`other`” will be able to be viewed in the web browser. You must make sure the files and directories allow public access. Directories under your `public_html` directory must be readable and searchable (not writable!) by “`other`”. Files under your `public_html` directory must also be readable (not writable or executable!) by others. Inaccessible files and directories will generate “Permission Denied” errors in your web browser. Files and directories with unwanted “write” permissions will allow other users to delete or erase your web pages. Don’t do that. Copies of the Course Notes ========================== You can find a searchable copy of all the Class Notes files on the Course Linux Server under Linux directory: ~idallen/public_html/teaching/ > The Linux shells will expand a leading “`~idallen`” on a pathname to be the > home directory of the “`idallen`” account, which is currently > `/home/idallen`, but could change, which is why `~idallen` is better since > it’s always correct. Under the above directory, pick the sub-directory corresponding to the current course, and under that course directory pick the current term. The *notes* are in a sub-directory under the term. You can search the *notes* directory using “`grep`” to find things quickly: $ ln -s ~idallen/public_html/teaching/cst8281/11w/notes/ notes $ grep -i -l transfer notes/*.txt notes/*.html The symbolic link makes it easier to search the notes directory. -- | Ian! D. Allen - idallen@idallen.ca - Ottawa, Ontario, Canada | Home Page: http://idallen.com/ Contact Improv: http://contactimprov.ca/ | College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/ | Defend digital freedom: http://eff.org/ and have fun: http://fools.ca/ [Plain Text] - plain text version of this page in [Pandoc Markdown] format [Course Home Page]: .. [Course Outline]: course_outline.pdf [All Weeks]: indexcgi.cgi [Plain Text]: 560_course_linux_server.txt [Report Problems]: 590_how_to_report_problems.txt [Your Personal Web Directory]: #your-personal-web-directory---public_html [College Home Page]: http://algonquincollege.com/ [570_file_transfer]: 570_file_transfer.html [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/