1

I'm following these instructions to set up LAMP on WSL. I got to step 3, and made the edits it instructed after "Make these edits:". However, after editing sshd_config using VSCode (in a WSL-2 window, which I figured might matter), I'm unable to save it and continue with the instructions.

VSCode first gives me this error popup when I try to save: Failed to save 'sshd_config': Insufficient permissions. Select 'Retry as Admin' to retry as administrator.

And when I select "Retry as Admin", it gives another: Failed to save 'sshd_config': Command failed: "C:\Users\smith\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd" --file-write "c:\Users\smith\AppData\Roaming\Code\code-elevated-BmAuYzjZ" "\\wsl.localhost\Ubuntu\etc\ssh\sshd_config" Error using --file-write: EPERM: operation not permitted, open '\\wsl.localhost\Ubuntu\etc\ssh\sshd_config'

What do I need to do to be able to use VSCode to make the edits to this file? I don't want to be locked into only being able to use Nano for this or any project, so I'd be very thankful for some guidance.


UPDATE: I think I've made a little headway! I tried following this similar tutorial, but on this step, trying to add this file, I get an error. I think I'm lacking some kind of permission to change WSL files in Explorer at all. Popup that says "You need permission to perform this action I'll try to figure out how to do this before going further, and I'll report back if I'm successful.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.