DEV Community

Cover image for SSH  to Remote server on VsCode in 1 minute
Sharkdevs 🦈
Sharkdevs 🦈

Posted on

SSH to Remote server on VsCode in 1 minute

Lately, I was working on a project in Digital Ocean. I wanted to pull and access the folders there in my local Visual studio code. While Vs Code Documentation solves this, I want to provide a straight forward way to pull a remote server to your Vs Code.

This article assumes that your ssh is already configured and all you want to do is get the remote server locally.

Alt Text

Step 1:Install Remote-SSH extension

On VsCode, navigate to extensions and Install Remote-SSH
Alt Text

Step 2: Configure SSH

i. Open the Vscode command Pallet(cmnd+shift+P) and type Remote. You will see a dropdown with several options. Click Remote-SSH: connect to host
Alt Text

ii. In the input box provided, insert the hostname to ssh to in the format username@hostname ie root@127.0.0.1 and click the highlighted option below it.
Alt Text

iii. Insert your password in the next step and Vscode will finish the rest of the configuration.

Finally:

To open your folders, Navigate to Files > open > file
Alternatively, you can click on the File Explorer to Open the folder that you would like to access.
Alt Text

Happy Coding From the shark🦈

Top comments (1)

Collapse
 
henrym2 profile image
Matthew Henry

Take a look at coder.com, they provide a super simple ssh solution that spins up a vscode container on any machine that supports it then pipes the code instance straight to your browser.