Web
VS Code SSH not working with Siteground SSH keys

If in the case that the VS Code remote SSH feature does not seem to respond well with Siteground, you can use an alternative such as Transmit by Panic Inc.

How to add an SSH key to Siteground

1) Run this command on your terminal, to get the SSH key:

pbcopy < ~/.ssh/id_rsa.pub

This will paste your SSH key onto your clipboard. For more info you might want to check Google on how to create your SSH key if you don’t have one yet, or like to create a new one.

2) Visit the SSH Keys Manager within Siteground. And simply paste what was copied to your clipboard earlier.

If SiteGround mentions this as invalid, this is because there is an empty line, just delete that empty line that can be found to the very end of what was just recently pasted.

3) Give a name to your key, so that you can easily identify that it is yours. If you are using the cPanel interface, you will also need to authorise your key under something in the likes of Manage Authorized Users.

Just tick the box to authorise yourself if it hasn’t already.

4) Now that you’ve successfully added the SSH key onto Siteground, next step is to open Transmit (or another SFTP program like FileZilla or CyberDuck to name a couple more) and visit the SFTP setup.

5) In the SFTP setup, follow the details provided by SiteGround here. Including the port number, as SiteGround does not normally use the default port 22.

6) And keep the password empty. You should now be successfully logged in.

7) Enjoy your SFTP access! Cheers with beers!

 

...