0

I am trying to edit files stored on my AWS EC2 server over SSH using Visual Studio Code. I have configured the connection as follows:

Host MyServer
     HostName <IP of my server>
     User bitnami
     IdentityFile "C:\Users\okonvick\.ssh\mykey.pem"

The user bitnami, however, does not have access to all the files I need to edit, and when in terminal, I need to use sudo to access them. However, I am at a loss finding out how to do it here. Is there any way to configure VS Code or the connection so that it elevates priveleges to access the files?

Ondrej
  • 1,610
  • 3
  • 19
  • 34
  • You might consider using the [save as root](https://marketplace.visualstudio.com/items?itemName=yy0931.save-as-root) extension. – Anon Coward Aug 10 '23 at 19:05
  • I tried it and it did seem to work. However, for some reason, when I'm using that extension, the file gets saved all right, but after a while, the server becomes unresponsive and requires a reboot. I know it sounds weird, but I've positively narrowed it down to using VS Code with the extension. – Ondrej Aug 14 '23 at 06:18

0 Answers0