Connect to a SiteGround Website Using SSH

,

SSH (Secure Shell) allows us to remotely access a server to configure and install scripts, manage files and folders, plus much more.

This article will show you how to use SSH to access a website located on a SiteGround server using an open source tool known as PuTTY.

 

Enabling SSH on SiteGound

You can enable SSH access from your Site Tools > Devs > SSH Keys Manager. Here you can manage your existing SSH keys and generate or import new ones.

Under Add New > Generate, enter the Key Name and assign it a password. Once done, simply click the Create button.

If you already have an SSH key pair, go to the Import tab and directly paste the public key into the Public Key text window. Currently the following algorithms for SSH key pairs are supported  on SiteGround servers: DSA, RSA, ECDSA, Ed25519.

Enter a Key Name and click Import.

 

Manage SSH Access on SiteGround

In the Manage SSH Keys section, you can view the details for the allowed SSH connections. You can check the Key Name and the allowed IPs. From the kebab menu for the corresponding SSH key, you can check the SSH Credentials, Manage IP Access, view the Private Key and Public Key and Change the Key Name or Delete the SSH key.

Go ahead and open your Private Key and copy it. We’ll need it for the next step to access the server.

 

Accessing Server using SSH

With the Private Key copied, create a file somewhere on your PC called private_key.ppk and open it with Notepad. Next paste your Private Key inside and Save the file.

Next we’ll need to download and install the free and open source SSH tool known as PuTTY. Do using the following link: Download PuTTY

Once installed, start puttygen.exe and click on Load. Next locate the private_key.ppk file you recently created and click on Open. Upon doing so you will be prompted for the password (passphrase) that you used to generate the SSH Key and the key will be loaded.

Once your Private Key is loaded, change the Type of key to generate option to DSA. After that click on Save private key and save it as putty.ppk

Next, start pageant.exe which will appear at the bottom right of your screen within the notifications taskbar area. Right-click that icon and select the Add Key option. Locate the putty.ppk file and click Open. You’ll be asked to enter the key’s password (passphrase) again after which you just click on the OK button.

Next, open putty.exe and enter the IP Address of your website in the Host Name field. The connection type should be set to SSH and the port should be set to 18765.

Click Open to initiate the connection to the server via SSH.

The first time you login, you will be prompted to save the server’s host key in the registry cache. Click Yes which will prevent that notification from appearing every time you connect to your account. You’ll also be prompted for a Username, which is listed in your Site Tools > Devs > SSH Keys Manager. Under Manage SSH Keys, go to the kebab menu > SSH Credentials. In the login as field enter the Username and press Enter on your keyboard to connect to your hosting account through SSH.

Next, you’ll want to learn the commands necessary to manage your website via SSH.

 

Conclusion

I welcome your thoughts, questions or suggestions on my article on how to connect to a website using SSH on SiteGround.

You may support my work by sending me a tip using your Brave browser or by sending me a one time donation using your credit card.

Let me know if you found any errors within my article or if I may further assist you by answering any additional questions you may have.