SSH

Back to Help Articles Last updated: 3rd February 2022 11:34

SSH stands for Secure Shell, and is a way to log into a terminal on the server securely, usually to run routine commands and administer your hosting account. All of our hosting accounts come with SSH access as standard (yes, even our free hosting accounts!).

You will need a SSH client installed on your computer or device in order to connect to our servers and run commands on your hosting account. If you're used to using the terminal you can simply use the ssh command, although you can also install a standalone SSH client such as PuTTY.

If you are connecting via SSH for the first time since your account was set up, you'll need to set your SSH password on the Dashboard first.

Connecting via SSH from the terminal

To connect via SSH from your terminal, use the following command:

ssh account@lon4.hartserver.net

where account is your hosting account name, which is also the first part of your account's primary URL (eg: account.hartserver.site), and lon4.hartserver.net is the home server hostname your hosting account is hosted on (it usually starts with lon4 but if you're unsure you can find it on the hosting control panel in the Dashboard at the top-right when managing your hosting account).

You will be asked for your SSH password, which should have been set via the Dashboard for the hosting account you're trying to access.

If all is successful, you should see something similar in your terminal:

Useful SSH commands

SSH allows you to manage a number of aspects of your hosting account very easily, a lot of which can also be managed via the Dashboard as well.

We have a number of useful commands installed for you to use, such as git (for managing repositories on your hosting account), composer (for managing PHP project dependencies), wp (for managing your WordPress installation via the command-line), and many more. If you need a useful command or package installing for SSH please get in touch with us and we'll see if we can add it for you.

Using PHP

Our SSH allows you to run different versions of PHP, perfect if you need to run a command under a different version from the default or latest version. We currently have versions 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 & 8.0 installed, but if you need a specific version installing just let us know.

To use a specific version of PHP, just use the path and executable like so: /usr/bin/php7.4