Logging in to Linux from Outside the University

This document explains how to log a terminal session into a Linux system in Cardiff School of Computer Science & Informatics from your home computer. Once logged in you can run applications and access other systems on the School's network.

If you are using a computer somewhere on the Internet away from the School of Computer Science & Informatics, for example a PC in Halls or at home (or even a PC in another part of the University), you can login in to the School's Linux server lapis to run terminal shell commands and start applications.

Terminal connections to lapis use secure shell (SSH) protocols which ensure that user names and passwords are transmitted securely over the Internet.

The SSH protocol will also support file transfer with appropriate applications. See Accessing Files Remotely, Accessing Your University Files Remotely from Windows and Vista, Accessing Your University Files Remotely from Linux PCs and Laptops and Accessing Your University Files Remotely from a Macintosh for details of this.

Secure Shell Applications

In order to make a terminal login connection to lapis, you will need a secure shell terminal emulation client program on your computer.

The following programs are available:

Platform Program
Windows PuTTY
Linux OpenSSH
Mac OS X OpenSSH

Obtaining the software

PuTTY is a free SSH and Telnet client Shell for Windows written and maintained primarily by Simon Tatham. PuTTY (and its file transfer components psftp and pscp) are available from http://www.chiark.greenend.org.uk/~sgtatham/putty/.

Versions of OpenSSH from http://www.openssh.net/ for Linux and MacOSX are distributed with the operating system. If your system does not have the software installed, obtain it from the installation DVDs or standard software repository.

Using PuTTY

PuTTY is a Windows executable .EXE file that you can install anywhere on your PC.

To start PuTTY, open the location where it is stored on your PC and double-click on its icon.

In PuTTY's configuration window, enter lapis.cs.cf.ac.uk as the host name and select the SSH protocol. Click on Open to connect.

The first time you connect to a host from your PC, you are given a security warning message. Click on Yes to continue.

A terminal window with login prompt appears. Type your username and then your University or School password when prompted.

You are logged into the shell on lapis where you can type commands for execution. Use the command logout to log out and teminate the PuTTY terminal emulator.

SSH on Linux and MacOSX

On Linux and Mac OSX you can use the program ssh, which is installed with the operating system or added afterwards, to login to the School's Linux system lapis.

To log in to lapis, open a terminal or shell window and type the command below.

ssh -Y lapis.cs.cf.ac.uk -l cxxxxxx

The first time you connect, lapis's fingerprint is displayed. After accepting this, you will be prompted for your password. If you enter your University password correctly, you will be logged in to a shell command interpreter on lapis. This is shown in the below sample output.

cxxxxxx@example ~ $ ssh -l cxxxxxx lapis.cs.cf.ac.uk
The authenticity of host 'lapis.cs.cf.ac.uk (' can't be established.
RSA key fingerprint is 2f:4a:c5:75:1f:d2:4f:a1:55:1c:23:1c:cd:ab:46:b9.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'lapis.cs.cf.ac.uk' (RSA) to the list of known hosts.
cxxxxxx@lapis.cs.cf.ac.uk's password:
Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.16.0-43-generic x86_64)

* Documentation: https://help.ubuntu.com/

0 packages can be updated.
0 updates are security updates.

Last login: Tue Jul 14 11:36:31 2015 from example.cs.cf.ac.uk

The -Y flag tells the server to pass X protocols to the client. This is useful if you want to run graphical applications on lapis and have them display on your local machine. However, you need a fast connection to make performance satisfactory (and you need to be running an X-server on your local machine – this will normally be the case if your local machine is a Linux laptop or workstation).

To log out of lapis, type logout in the terminal shell window and remember to exit any other X applications you have started in the background.

The ssh command can also be used to run individual commands on lapis. Append the command you want to execute to the ssh command line. For example, to list the contents of your home directory use the following command.

ssh lapis.cs.cf.ac.uk -l xxxxxxx ls -lR