How to log in to my SiteGround shared account via SSH in Mac OS?

SiteGround uses key-based SSH authentication instead of plain username & password. The SSH port on SiteGround's servers is also 18765 instead of the default port 22.

To connect via SSH, follow these steps:

  • First you will need to generate an SSH key pair - a public key and a private key. This can be done in cPanel -> SSH/Shell Access. The process is covered in this tutorial.
  • Next you need to copy the private key from cPanel and save it into a text file on your computer.
  • Then, you should change the permissions of the newly created file to more secure ones. To do that, run the following command in the Terminal:

You should replace /Users/youruser/private_key with the location of your private key text file.

  • Afterwards you need to load the saved private key into your SSH-agent. To do so open up the Terminal and use the command:

You will have to again substitute /Users/youruser/private_key with the location of your private key text file.

  • Next you will be prompted to type in the key's password. You get to choose the password when generating keys in cPanel.

Finally, you can connect via SSH. To connect, use the following command in the Terminal:

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

USER - your cPanel username.
HOST_NAME (or IP address) - enter the host/IP of the server to which you wish to connect (e.g.
PORT - the port for the connection - use 18765

Your cPanel username, server hostname, and the IP address of your hosting account are all available in your User Area -> My Accounts -> Information & Settings (under the hosting account you will be connecting to).

For example if your cPanel username is user1 and your hosting server is 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!