Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99023

Visual Studio Code Remote explorer - how to make it work at sudo level

$
0
0

I can connect to a remote linux machine using ssh as user xuser. Once the connection is active as xuser, I can sudo -s and operate as root. For example I am able to edit files in /root.

What I would like to do is to obtain the same result using visual studio code remote explorer (VSCRE). While it is easy to connect to the remote machine as xuser@remotemachine and browse the fileystem tree under /home/xuser, trying to access / or /root is rejected and I don't know how to make VSCRE operate as if I run sudo -s in a terminal.

I tried also to use the root user (enabling it and giving it a password) but VS code continues to ask for root's password indefinitely and doesn't connect to the remote host.

Does anyone know how to achieve the described result?

P.S. Someone could consider this question as a duplicate of How to edit files from remote server as root while ssh-ing from VS code?. However, I am also asking how to use root, which the other question does not ask.


Viewing all articles
Browse latest Browse all 99023

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>