Instructions for setting up VS Code to remote to a Linux server.
In my case, it’s Amazon Linux 2 running .net core. In Linux, at the command line, I created a project using:
dotnet new web --name Employee
Then on VS Code (running in Azure), connect to the Amazon Linux instance by:
- Install the Extension Pack Remote-SSH.
- Verify that you can ssh to the remote server using Powershell or GitBash (or another tool of choice).
- In the leftmost pane of Visual Studio Code, click on the Remote Explorer icon.
- In the SSH Targets explorer, click the Configure icon. (It looks like a gear.)
- In the middle of Visual Studio Code, you’ll see a prompt with several possible files. Choose whichever you prefer.
- Fill in the values for your setup similar to the following:

- In VS Code now, near the bottom left, you should see “SSH:Hostname” where Hostname is the name of the Host in config. Navigate to the desired folder to open your project.
You must be logged in to post a comment.