Server Management

This applies only to servers hosted on MeridianGroup equipment.

Getting Connected

Generating your Key

For some actions on MeridianGroup, an SSH Key might be required.

In order to generate your SSH key on Mac/Linux or Windows:

$ ssh-keygen

The public part of your key will then (by default) be available in ~/.ssh/id_rsa.pub, where ~ is your user directory.

Please generate at least 2048-bit keys using RSA.

Once you have generated your key, please send the public part of your key to the person in charge, who will add it to your account. Note that multiple keys can be used for one account, so it is a good idea to use a different key for each machine you connect from to increase security.

Connecting to SSH

One of the most useful tools you will have access to is secure shell. This allows you to issue commands directly to the server.

In order to connect on Mac/Linux or Windows with CygWin MinGW, or PowerShell in an up-to-date version of Windows 10:

$ ssh <username>@<hostname>

In order to connect on Windows with PuTTY, enter the hostname into the hostname box.

You will be prompted to provide your username and your password, after which you should be connected.

Connecting to SFTP

As well as using SSH, you can also use SFTP (not to be confused with FTPS). This allows you an easier way to transfer files. Setup is the same as above.

Some recommended SFTP clients are:

A Quick Guide to SSH

Navigation

To navigate around, you can use the command cd, short for 'change directory'. Specify cd followed by the folder you wish to descend into. To go up a folder, use cd ...

To list the contents of the folder you are currently in (also known as your working directory), type ls, short for list.

Editing a File

To open a text file for editing, type nano and then the name of the file, for example:

$ nano config.cfg

For more experienced users, vim is also available.

Controlling your Server

Unless you have been told otherwise, your server will be controlled through a program called systemd. This means a few things:

  • Your game server will automatically start if the whole server restarts
  • Your server will save all it's logs to a central location

In order to see the status of your server, and the last few lines of it's log:

$ systemctl status <server name>

where <server name> is the name of your server as provided to you by the person in charge. For example, for XM, the FiveM server, you would run:

$ systemctl status fivem

If you wish to control your server, you can run the following commands:

$ sudo systemctl start <server name>
$ sudo systemctl restart <server name>
$ sudo systemctl stop <server name>

Note that you need to use the word sudo here. This allows you to execute some commands as the 'superuser', a privileged user.

Viewing logs

To view logs, you need to view part of the journal using the command:

$ journalctl -u <server name>

Where you view the journal unit for your server. To find out more about the clever things journalctl can do, see the manual by running the command man journalctl.