The Course Linux Server - conference-srv

Ian! D. Allen - idallen@idallen.ca - www.idallen.com

Fall 2011 - September to December 2011 - Updated 2011-11-10 19:11 EST

1 Problem Reporting for the Course Linux ServerIndexup to index

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.

2 Access to the Course Linux ServerIndexup to index

The Course Linux Server conference-srv is located behind an Algonquin College firewall but has some limited access from the Public Internet. It is a four-processor Intel(R) Xeon(R) X3220 @2.40GHz with 8GB of memory running GNU/Linux Ubuntu 9.04 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 Algonquin VPN.

3 HTTP Access to the Course Linux ServerIndexup to index

For information on setting up your own personal web directory on the Course Linux Server see the section on Your Personal Web Directory below.

3.1 HTTP via Public gateway cst8281.idallen.ca and special port 8080Indexup to index

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 (and port number) for all your W3C validation activities.

3.2 HTTP via Private IP 10.50.254.165 or cst8281pvt.dyndns.orgIndexup to index

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.165, 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.)

The DNS name cst8281pvt.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!

4 Logging in to the Course Linux Server using SSHIndexup to index

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.

4.1 Log in via SSH from Unix/Linux, Mac OSX, and CygwinIndexup to index

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.

4.1.1 SSH Via Public gateway cst8281.idallen.ca and special port 2222Indexup to index

    $ 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.

4.1.2 SSH Via VPN or On-Campus via 10.50.254.165 or cst8281pvt.dyndns.orgIndexup to index

    $ ssh abcd0001@10.50.254.165
    *** COURSE LINUX SERVER idallen@idallen.ca ***
    abcd0001@10.50.254.165's password: 
or
    $ ssh abcd0001@cst8281pvt.dyndns.org
    *** COURSE LINUX SERVER idallen@idallen.ca ***
    abcd0001@10.50.254.165'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.

4.2 Log in via SSH from Windows using PuTTYIndexup to index

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.

4.2.1 PuTTY Configuration options for Windows usersIndexup to index

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.165      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.165. Under Session, enter a Saved Session name and save this session for later use.
    • You may use the name cst8281pvt.dyndns.org instead of the private IP address 10.50.254.165.

5 File Transfer to/from the Course Linux ServerIndexup to index

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.

6 Your Personal Web Directory - public_htmlIndexup to index

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.165/~abcd0001/             (PRIVATE IP)

Replace abcd0001 by your account userid. There is a tilde character preceding the account userid, above. For example, for userid alleni: http://cst8281.idallen.ca:8080/~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.165 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.165/~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 - marks off for poor security.

7 Copies of the Course NotesIndexup to index

When you are connected to a terminal session on the Course Linux Server, you can find a searchable copy of all the Class Notes files 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. It helps to have a short link to the notes:

    $ cd
    $ ln  -s  ~idallen/public_html/teaching/cst8281/11f/notes/  notes
    $ grep  -i -l  "transfer"  notes/*.txt  notes/*.html
    [... lots of file names print here ...]

The symbolic link in the home directory makes it easier to search the notes directory without having to type the long pathname.

Author: 
| 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

Campaign for non-browser-specific HTML   Valid XHTML 1.0 Transitional   Valid CSS!   Creative Commons by nc sa 3.0   Hacker Ideals Emblem   Author Ian! D. Allen