SSH access with Siteground

webServerToolsOccasionally you might need to have SSH access to the Siteground web host.  This article describes the process when using a Mac. It might be similar with other Web Hosting providers?


Generate key on iMac

The first step is to generate a key pair on the Mac.

  1. Start Terminal and run the following command.
ssh-keygen -t dsa

Enter a password twice.

 

Siteground

Start by logging in to siteground.com.

  1. Select the My Accounts tab.
  2. Click Go to cPanel.
  3. Open Advanced > SSH/Shell access.
  4. Complete the details in the Generate new SSH key pair dialog box.
    1. First name: Steven
    2. Last name: Pryer
    3. email: This email address is being protected from spambots. You need JavaScript enabled to view it.
    4. Password:  (as above)
    5. Use whatsmyip.org to discover your local IP address, and enter for the Allowed IP address.
  5. Click Generate.

 

Upload SSH key

Now you can upload the public key that was just created on your Mac.

  1. In Terminal run the following command.
cp ~/.ssh/id_dsa.pub /Users/steven/Desktop/

This will copy the public key file to your desktop where you can open it with TextEdit.  With the file open for editing, you can copy all the contents, upto the ==.

  1. In Siteground open the cPanel > Advanced > SSH/Shell access.
  2. In the Upload SSH Key area, paste your Public Key.
  3. Enter your Allowed IP address once more.
  4. Click Upload.

 

SSH Access

You should now be able to access the server from your Mac.

  1. In Terminal run the following command.
ssh This email address is being protected from spambots. You need JavaScript enabled to view it. -p 18765

 

Thanks for visiting.