2) A running SSH server preferrable a linux server running on an EC2 instance.
3) An SSH Client on your local system.
Steps to SSH on VSCode
a) Install the Remote extension pack on your vscode.
b) In VSCode, press F1 to open the command palette, and type connect.
c) Select Remote-SSH: Connect to Host. This will bring out options for you to add or configure SSH Hosts.
d) Select configure SSH Hosts. This will give you options to create a config file. For mine I selected the first option /Users/username/.ssh/config.
The Host is any name you want VSCode to use to recognize your file.
The HostName is the public dns of your EC2 instance or public ip address of your server.
The User is the username of your server.
The IdentityFile is the path to your ssh key which you got when you created your EC2 instance.
Congrats!! 🥳 You have successfully connected your remote server to VSCode. Now you can start working on those files you want.
If it didn't connect, don't despair, it will output some messages in the VSCode debug console. From there, you can see what's wrong.
Please leave your questions and comments below. I will be happy to answer them.