Chapter 2. Connecting to your server with FileZilla and SFTP

Table of Contents

2.1. Connection details
2.2. Connecting using FileZilla
2.3. Common FileZilla recipes

Before you start this chapter

  1. Install FileZilla on your computer; it is freely available from its project website for Windows, Mac OS X, and GNU/Linux.

In this chapter you’ll learn how to connect to your server ready to transfer files using the FileZilla program. It has been assumed that you have a working copy of this program installed on your desktop computer.

2.1. Connection details

A server installed with Symbiosis will be running SSH, and will have had the admin user account created. This allows you to connect via SFTP to administer the machine.

The admin account should be used when administering a Symbiosis system to ensure that files and directories have the correctcode-sign.co.uk permissions.

Usage of SFTP is mandated for administrating the machine, as all data are passed over the network encrypted.

2.2. Connecting using FileZilla

Throughout the documentation the example server name example.vm.bytemark.co.uk should be substituted for your own server name.

  1. Start FileZilla and enter the details in the text fields below the program’s toolbar. The name of your server goes in the Host text field a and admin in the Username field b.

  2. Complete the connection details by filling in the Password field c with the password for the admin user, and the standard SSH port number, 22 in the Port field d.

  3. Click the Quickconnect button a to the right of the text fields; the first time you do this you’ll get a warning message that is safe to ignore, so check it’s Always trust … box b and click the OK button c.

  4. In the text area immediately below the Quickconnect bar you’ll see messages scroll by as the connection to the server is made.

Tip

You won’t need to enter those details each time you connect. Click the small button to the right of the Quickconnect button to reveal the sftp://admin@example.vm.bytemark.co.uk as a history item. In future simply select that link.

The following figure shows FileZilla’s layout after successfully logging in. The display is divided into four main sections, the top left pane shows a directory tree, with the directories on your local computer, labelled a. Beneath that is a listing showing the contents of the currently selected local directory, labelled b. Then the top right pane shows the directory tree of the remote machine. When logging in as admin this will show /srv (c). Finally beneath that is the contents of that directory. Initially this will only contain one directory named after the machine. In this case example.vm.bytemark.co.uk/ is shown (d).

Once you’ve been able to successfully connect to your server, via FileZilla, you may proceed to configure email, or setup your website.

2.3. Common FileZilla recipes

This section demonstrates how to carry out some common tasks with the FileZilla client:

Navigating local and remote filesystems

  1. To open the /srv directory on the server, click the + icon.

  2. Notice that the folders that appear in the tree display are already displayed in the Filename window. You can use the scrollbars a and b to adjust the view; as in any desktop window you can also use the Control c to expand the Filezilla display to full screen or just drag it’s corners in the usual way.

  3. When you click on the example.vm.bytemark.co.uk label (not the directory icon), the + control appears. The contents of the directory are already displayed in the Filename window.

  4. Click the + control to see those contents as part of a tree view and notice that you now have a - control, which could be used to close this detail of the file system structure.

  5. Those operations were all carried out on the right side of the screen where the Remote site:, in this case the server example.vm, is represented. Comparable operations can be carried out on the left side of the screen, where the Local site:. represents the file system on the desktop machine.

Creating a remote directory

In this walkthrough, a mailbox will created for a user alice. That is done by creating a directory under the /srv/my-brilliant-site.com/mailboxes directory. (The configuration of email is described fully in Chapter 4, Configuring email.)

  1. Highlight the parent directory by pointing at the mailboxes label (not the icon) and left-clicking.

  2. Right click to bring up the menu and select Create directory.

  3. The Create dialog starts; the default path /srv/my-brilliant-site.com/mailboxes. is as we want it, but not the default name New directory.

  4. Edit that, replacing New directory with alice, then click the OK button.

  5. The /srv/my-brilliant-site.com/mailboxes/alice has been created.

Creating a remote file

Unfortunately creating a file upon the remote server cannot be completed directly within Filezilla, but that limitation can be skirted around by creating the file on your local machine and then uploading it to the correct location on the server.

Note

Windows desktop systems tend to silently add the .txt extension when you create a plain text file; that makes necessary the additional step of renaming the file.

This walkthrough demonstrates the procedure for allowing the user alice to logon to the mailbox at the my-brilliant-site.com domain; in doing so, it covers the creation, upload and rename operations.

  1. The Notepad program has been used to create a plain text document that contains a secure password on a single line. Although the name "password" was specified as the filename, Filezilla reveals that the ".txt" extension has been silently added to that.

  2. Right click on the password file to bring up the menu and select the Rename option.

  3. Rename the file by removing the unwanted .txt extension.

  4. Press your Enter key to complete that; the file has been renamed from password.txt to password. Move to the Remote site: area on the right side of the Filezilla display and navigate to the /srv/my-brilliant-site.com/mailboxes/alice directory

  5. Moving back to the left side of the Filezilla display, again highlight the password file and right click to bring up the menu. This time select the Upload option.

  6. The password file has been created on the server in effect, by uploading it from the local desktop machine. An alternative method of achieving this is to select the file and in the local Filename area and drag it to the Filname area of the server.

Deleting files and directories

  1. The password file on the local machine is no longer needed; select and right click then choose the Delete option.

  2. Confirm that you do want to delete the file by pressing the Yes button in the Delete file dialog.

  3. The local password file has been deleted. In the same way files and also directories can be deleted from the server, the only diffence being that the Confirmation needed dialog that comes up is less detailed than the local Delete file dialog. Below is what would be seen if user alice was to be removed; the alice directory and the Delete option have been selected.

  4. The Yes button in the Confirmation needed dialog was selected and the alice directory has been removed.