Chapter 11. Connecting to your server via SSH

Table of Contents

11.1. Why SSH access?
11.2. Using PuTTY to connect via SSH
11.3. Using a terminal program to connect via SSH

So far we have looked at making connections and transfer files using the SFTP proctocol. For certain operations it is also necessary to connect using the SSH protocol. This is used to gain command-line access to the machine.

There are two connection programs are documented, depending on your desktop environment, and your preference.

11.1. Why SSH access?

So far connecting using SFTP has been documented. This is used to manage files on the machine. From time to time it can be necessary to have to run commands on the machine itself. This is where SSH comes in.

SSH allows shell access to a machine, which provides the ability to run commands directly on that machine. Shell access is the equivalent of the MS-DOS or cmd prompt on Windows PCs, or the terminal on machines running Mac OS X or Linux. SSH is an encrypted protocol, like SFTP, ensuring that all commands and passwords pass between your computer and the server are protected against eavesdroppers.

For Bytemark customers, SSH is also used to access the Console Shell of the machine.

11.2. Using PuTTY to connect via SSH

PuTTY is a free and open-source SSH application, and available for download from its homepage. It is available for both Windows and Linux desktop machines.

  1. Start PuTTY; Under Windows you may get a Security Warning — if so you need to click the Run button.

  2. Enter your server’s name in the Host Name field a; the Port field b should read 22, and the SSH radio button c. Click Open d to start the connection.

  3. The PuTTY command window will open; the first time you do this, as with FileZilla, you get a Security Alert, warning that the key is untrusted. It is safe to say Yes the first time you connect to your machine.

  4. At the Login as prompt type admin and press enter. Then the [label]admin@example.vm.bytemark.co.uk’s password| prompt appears. Enter the password followed by enter. Nothing is displayed when the password is entered.

  5. You’ll log in and get presented with the admin@example:~$ prompt, ready to accept commands.

Tip

When the machine is setup, the root and admin, as well as the mysql database root passwords are all the same.

11.3. Using a terminal program to connect via SSH

Both Linux and Mac OS X desktop machines tend to come with the ssh command available.

  1. Open a terminal emulator and enter the command ssh admin@example.vm.bytemark.co.uk.

  2. The first time you connect to your machine a warning message about the authenticity of the host will appear. The first time you connect to the machine, we can assume the host is authentic. So enter "yes", to accept the key and to continue connecting.

  3. The connection has been made as user admin, so enter the admin user password , a; that does not get echoed to the screen. At the end of the dialogue you see the prompt, admin@example:~$, b.