System Administration for the Web:
Project Introduction

17 October 2005

Login and Password

You and your partner(s) have been assigned the following login information for the project:

Login: group0

Password: p4ssw0rd

Your login and password will allow you to connect to your server's virtual console via SSH, and your password is the root password to your server. You can change your server's root password, but you cannot change the password you use to access your virtual console.

Server Introduction

In order to provide the most realistic environment for your project, we are giving you unrestricted access to your own private virtual server. For the purposes of the project, the virtual server will behave exactly as if you purchased your own server from some manufacturer (Dell, IBM, Sun Microsystems, etc) and connected it to the Internet. You have root access to your server; that is, you have the most powerful user account on a server - there is nothing you cannot do. For example, as root, you are able to modify any file on the server, and you can even reboot it.

We have preinstalled Debian GNU/Linux 3.1 ( http://www.debian.org ) on your virtual server. Debian Linux is very similar to Solaris, the operating system that you have been using on your inst and OCF accounts. However, some commands behave differently or use different syntax on Linux; if something unexpected occurs when you're trying to use a command, please refer to its manpage.

Connecting to Your Server

Initially, your virtual console is the only method you can use to connect to your server. To open a connection to your virtual console, use the following command:

ssh group0@192.58.221.232
Enter your password when prompted. You'll be dropped into what appears to be a terminal on your server. In reality, what you see is the system console, the thing you would see if you plugged a monitor and keyboard directly into a server.

You will need to log into your server as root using the same password as before. You are now at a root command prompt. When you wish to disconnect, type exit to logout and Ctrl-] to disconnect from your server.

Installing SSH

We have intentionally provided you with a very bare server configuration since most servers will NOT come preinstalled with all the tools you need. It is often the system administrator's job to prepare a server for real-world use.

The first thing you will do is install SSH to provide you with a second method to connect to your server. There are three reasons why a system administrator would want to do this:

  1. Remote connectivity. We've configured your virtual console so that you can connect to it using the Internet, but, in reality, a virtual console usually requires a monitor and keyboard directly connected to the server. Since system administrators do not like spending their lives inside the server room, they install SSH so they can work on the server without actually being near it.
  2. Redundancy. In the case that the virtual console breaks, SSH provides a backup method for a system administrator to fix a server.
  3. Multiple Access. There is only one virtual console and only one person can use it at a time. SSH allows multiple system administrators to work at the same time by opening a different terminal for each login.
Debian GNU/Linux provides a very useful tool for managing software on a server: apt-get. apt-get can install, remove, and upgrade software using very simple commands with little intervention required from a system administrator. You'll learn more about apt-get as you complete your project, but, for now, type in the following commands:

apt-get update

apt-get install ssh

Agree to any prompts and accept all defaults if you are presented with a choice. If you didn't see any error messages, you have successfully installed SSH! Wasn't that easy?

Configuring SSH

As you learned in a previous lecture, SSH is a network daemon that binds to an Internet port and waits for a connection. In the case of SSH, the default Internet port is port 22.

The actual server hosting everyone's virtual server only has one IP address. Each IP address has only one set of ports, 1-65535. Unfortunately, only one program can control a certain port at a time, and since everyone is running a default configuration of SSH, everyone will be trying to take control of port 22 on the server.

Our solution to this dilemma is to assign every group their own private range of ports. Each group is assigned 100 Internet ports, 1##00 to 1##99, where ## is your group number, padded by a 0 if it is less than 10. For example, group1 would have the Internet ports from 10100 to 10199 and group11 would have the Internet ports from 11100 to 11199.

You need to configure your SSH daemon to listen on port 1##22. Your SSH daemon configuration file is located at /etc/ssh/sshd_config. Edit this file as necessary (read the manpage or search the Internet for help if you need it), and instruct your SSH daemon to reload its configuration by executing the following command:

/etc/init.d/ssh restart

Connecting to Your Server Via SSH

If you have properly configured your SSH daemon, you should be able to connect to your server from any computer by using the following command:

ssh root@192.58.221.232 -p 1##22
Open a new terminal window and see if this works. Have your partner(s) do the same. From now on, SSH should be your preferred method for connecting to your virtual server.

Creating User Accounts

root access can be dangerous. The system will never ask you to confirm a command as root, and thus, it is very easy for accidents to occur. Consequently, smart system administrators login as a non-privileged or regular user and only become root when absolutely necessary.

Locate the command for adding a regular user to the server and have each person in your group create their own account. Once the accounts are created, you'll be able to log into your server using your regular account via SSH (as described in the previous section, replacing root with your username). Use your regular account to experiment with your server.

About this document ...

System Administration for the Web:
Project Introduction

This document was generated using the LaTeX2HTML translator Version 2002-2-1 (1.71)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -split 0 1.tex

The translation was initiated by zeroion on 2005-10-16

zeroion 2005-10-16