Enable root login over SSH for Dedicated Servers on Linux

SiteGround uses key-based SSH authentication and alternative SSH port number - 18765 instead of the default port 22. In case you have root access to your Dedicated server this article will help you establish an SSH connection on your Linux distribution.

Note that access from your IP address should be allowed for the SSH port on the server. You can request this by posting a ticket from your User Area -> Support -> Report Other Technical Issues.

To connect via SSH with your root user, please follow the steps below:

  • The first step is to generate an SSH key pair. You need to do this from your Linux Terminal. You can check this article which covers the key generation process.
  • After you generate the SSH key pair, you should add the public key through your WHM (Web Host Manager). To do so, log in to your server's WHM panel as root and go to Manage root's SSH Keys located in the Security section. Click the Import Key button. Type in a name and a passphrase for the key and paste your public key in the corresponding field. You don't have to paste your private key. Click Import to import your key.
  • Once you import the public key in your WHM, you will need to load the saved private key into your SSH-agent. To do so open up your Terminal and use the command:

Make sure that you substitute /Users/youruser/private_key with the location of your private key text file. You will be prompted to type in the key's password - make sure that you type the password that you've placed during the SSH key pair setup on your Linux.

  • The final step is to connect via SSH from your Terminal using this command:

You will need to substitute the following variables with your account details:

USER - root
HOST_NAME (or IP address) - enter the server's hostname or IP
PORT - the port for the connection - use 18765

Your dedicated server details are available in your User Area -> My Accounts -> Information & Settings (under the hosting account you will be connecting to).

For example, if your hosting server is esm9999.sgded.com you will need to execute the following command in your Terminal:

You find this article useful? Click here to learn more about SiteGround web hosting experts and what else we can do for you!