Issue
Recently I hosted a website on amazon EC2.
Is there an easy way to edit my files without having to ssh and edit them on terminal?
It would be better if I can edit them on my local computer using VScode and commit directly to the host server.
Solution
You can use the VSCode Remote SSH Extension
Follow the tutorial "Using VSCode remotely on an EC2 instance" from Christy Jacob
You need to create an entry in your ~/.ssh/config
file
Host aws-ec2
HostName ec2-44-229-243-8.us-west-2.compute.amazonaws.com
User ubuntu
IdentityFile ~/aws-key/test-key-pair.pem
Then you can connect to that entry from VSCode:
Answered By - VonC