Articles on: Dedicated Servers / VPS

How to connect to your VPS using Visual Studio Code

There is video version of this article available. Click here to view the video.

How to connect to your VPS using Visual Studio Code

Select the server to which you want to connect to and click on Manage.

Find your VPS IP address on the right side of the panel, and take note of it, as you will need it to connect to your VPS.

Open Visual Studio Code(VSC) and in the Extensions: Marketplace, search “Remote - SSH” and install the first extension by Microsoft.

Click on the Remote Explorer Button, which usually is under the Extensions: Marketplace button, and click on the Plus icon to add a new SSH Target.

In the “Enter SSH Command” box, type “ssh root@<Your VPS IP Address>”, For Example: “ssh root@123.456.78.910”, and click Enter twice.

Under SSH Targets, right-click on your VPS IP Address, and click on “Connect to Host in Current Window”.

Click on the VPS’ Operating System and click Enter. Then enter the Root Password that you’ve set when ordering your VPS.

Go to the Explorer tab, and click on Open Folder.

Select the Folder that you would like to open and click OK, then Enter your Root Password.

After that, you can now use Visual Studio Code to upload, & edit your files & run terminal commands on your VPS.

How to disconnect from your VPS using Visual Studio Code

To disconnect from your VPS, click on File on the top-left area and click on “Close Remote Connection”.

How to reconnect to your VPS using Visual Studio Code

Open the Remote Explorer and under your VPS’ IP Address, right-click the folder that you would like to open then click on “Open on SSH Host in Current Window”.

Then Enter your Root Password, and it should reconnect you to your VPS.

If you require any further assistance, please create a ticket here.

Created By: Alecz R.

Updated on: 11/11/2022

Was this article helpful?

Share your feedback


Thank you!