Virtual Servers

Everyone enrolled in the class has a virtual server running the Debian operating system. For now, the servers are only visible on the campus network. This means you will have to VPN to the campus network or use a campus machine to connect to the servers.

Each of you has root access on your server. You are responsible for the machines and must conform to the appropriate campus policies.

Connecting to the Servers

You can use any SSH client:
  • ssh user@hostname (linux, unix)
  • PuTTY (windows)
  • SecureCRT (windows)
The hostname will be of the form  Your user is 'root' and your password is as provided to you in class.  See me if you have not received your password yet.

Connecting to TigerNet via VPN

On Windows and Mac OS, you can follow IT's instructions:

On Ubuntu (or other Gnome desktops) you can connect to the campus network TigerNet via VPN in order to access your virtual server behind the firewall.  This will allow you, for example, to point your home computer's browser at your virtual server's web servers and to connect directly to your virtual server via SSH.  Follow these steps to set up VPN:
  1. install network-manager-vpnc (the Cisco VPN plugin for Gnome Network Manager) using APT
  2. REBOOT your computer (dunno why this is necessary)
  3. click the Network Manager taskbar icon and select VPN Connections -> Configure VPN
  4. create a new Cisco-compatible VPN connection 
  5. fill in the following fields as follows:
    1. Connection name: TigerNet
    2. Gateway:
    3. Group name: tigernet
    4. User password: your pawprint password
    5. Group password: tigernet
    6. User name: your pawprint
  6. hit apply to save your configuration
  7. click again on the Network Manager taskbar icon and select VPN Connections -> TigerNet
  8. Select "Always Allow" if Keyring prompts you for permission
  9. to disconnect, select VPN Connections -> Disconnect VPN

Updating and Installing Software

Use APT to upgrade and install software:

# apt-get update
# apt-get upgrade
# apt-get install <package-name>
# apt-cache search <package-search-term>

Things You Should Install

  • tomcat6
  • sqlite3
  • python2.7

Running Processes in the Background

One way to keep your servers running even after you log out is to use the nohup ("no hang up") command:

nohup python &

Make sure you have a way to kill your process tho, or it might continue to run forever.  One way to stop a process is with the killall command:

killall python

WARNING: This will stop all of your Python scripts, so be careful when you are supposed to have multiple servers running continuously.

Running Services at Startup

WARNING: This isn't recommended anymore (too many people have messed up their VMs in the past), but you are welcome to try if you are very careful!

With Debian it is easy to make a script run automatically when the server starts up or shuts down.  When the system starts up, it will run your script with the argument 'start' and the argument 'stop' when it shuts down.  Your script should check for these arguments and launch a background process.  For example:

case "$1" in

        echo "starting server..."
        start-stop-daemon --start ...

        echo "stopping server..."
        start-stop-daemon --stop ...

        echo "usage: command {start | stop}"
        exit 1


exit 0

Make sure your script works and is runnable.  Copy your script to /etc/init/ and enable it with:

# update-rc.d defaults

Once installed, you can start and stop your server like this:

# /etc/init.d/ start
# /etc/init.d/ stop

Make sure both start and stop work without hanging, or your system may not be able to start-up or shut-down properly.