Calling all who code. Take the 2023 Developer Survey.

Questions tagged [vscode-remote]

Visual Studio Code Remote Development allows you to use a container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured development environment

Filter by
Sorted by
Tagged with
89 votes
10 answers
105k views

How to save a file in vscode-remote SSH with a non-root user privileges

I am not able to save any files on my remote server with VSCode Remote SSH because I am not a root user. I've followed the official documentation about how to set up ssh with SSH config file but even ...
  • 993
86 votes
32 answers
116k views

VScode remote connection error: The process tried to write to a nonexistent pipe

I use vscode with remote-ssh to connect my server, after configuring, I want to connect my host, but it failed, the dialog box display:"could not establish connection to XX, The process tried to ...
  • 2,358
54 votes
5 answers
55k views

Using "Remote SSH" in VSCode on a target machine that only allows inbound SSH connections

Is there a way to use the VSCode Remote SSH extension to interact with a remote host that does not allow outbound internet connections? Is it possible to download the vscode-server files from another ...
  • 1,162
54 votes
2 answers
45k views

How do we remove ssh targets from Remote Explorer

The Remote Explorer sidebar has an obvious icon for adding new targets but I can't find an option for removing or editing a target. In my case, servers' IPs change frequently so they just continue to ...
  • 1,917
53 votes
4 answers
27k views

Is there a way to reconnect to a disconnected VS Code Remote SSH connection?

When you're running VS Code Remote SSH and loose network connectivity over a long period of time and return to VS Code, the status on the bottom left show's "Disconnected from SSH: ". However, there ...
  • 2,555
49 votes
9 answers
39k views

VSCode in WSL: how to sudo a root file so I can edit it

WSL v.1 -- VSCode v1.40.1 (using 'Remote - WSL' extension 40.3) How to open a root-owned file for edit using sudo and VSCode? (without running as root) If I open a root file without sudo, I can't ...
39 votes
2 answers
33k views

How to change vscode-server directory

I am trying to use vscode remote ssh extension and connect to Linux machine that has access to my files. Vscode install the server on the Linux machine under user home directory where due to company ...
38 votes
3 answers
64k views

How to kill VSCode remote services on Ubuntu Host

I just updated VSCode Remote Insider and I can't connect to my host through VSCode anymore. I tried to uninstall my local VSCode Insider and restart it, but it didn't help. Then, I removed the .vscode-...
  • 493
36 votes
9 answers
43k views

VS Code: connect a docker container in a remote server

I want to work in a container in a remote server. But it doesn't work. Environment: Local: Windows 10 Local Terminal for ssh: WSL in Windows 10 Server: Ubuntu 18.04 I checked these two articles. https:...
33 votes
12 answers
53k views

I've already setup the ssh key, but VSCode keeps asking for password

I'm using a macbook(MacOS) to connect to a remote Ubuntu server. I copied the public ssh key to the server using ssh-copy-id and checked that the ssh key works on the terminal. When I do ssh username@...
  • 561
33 votes
2 answers
2k views

keep Running Jupyter notebook with VSCode on remote server (SSH) after disconnecting

i'm working with VSCode on remote server via ssh with the jupyter notebook extension. but when im disconnect from the session the process of the code is stopped. is there a way to run the notebook ...
  • 333
31 votes
7 answers
27k views

VS Code Remote-SSH: The vscode server failed to start SSH

I'm trying to connect to a server via remote-ssh extension for Visual Studio Code, however, I'm getting the following error: The vscode server failed to start SSH Everything is fine on the server-...
  • 1,962
29 votes
8 answers
19k views

Can I SSH from WSL in Visual Studio Code?

I am using WSL on Windows 10 to program, and recently discovered that VSCode can be used to edit programs through SSH. However, I normally SSH into my university's computers through WSL so I can ...
26 votes
3 answers
10k views

Multiple devcontainers in vscode-remote

I have a project that creates multiple Docker images. I would like to setup a devcontainer in vscode-remote for each image so that I may spin up a container for each image. I only need to spin up and ...
  • 425
25 votes
4 answers
17k views

Does vscode remote support double ssh?

I have a gpu-server Server-A in office. The only way to access that server is through the office wired network. The office provides a proxy server Server-B. How I connect to the Server-A? I first ssh ...
24 votes
3 answers
25k views

VsCode Remote SSH .vscode-server taking up a lot of space

I got an alert this morning for disk space in /home on a multi user remote SSH dev environment server. Running partition -$xdev -type f -ls | sort -k 7 -r -n | head -20 I saw that the largest ...
  • 383
23 votes
1 answer
3k views

How can I change the color of the >< remote icon in the VS Code status bar?

I installed the VS Code Remote Development extensions but the green >< icon in the left of the status bar doesn't look good with my preferred theme. How do I change its color?
  • 56.3k
23 votes
2 answers
11k views

Is there a way to get git to work properly from within a dev container using VS Code?

I am working with VS Code and I installed the Remote Development extension. I created a devcontainer for my Angular application. So far, everything works fine. The Dockerfile and the devcontainer.json ...
  • 777
22 votes
12 answers
23k views

EACCESS error when installing packages on WSL

I'm getting this error trying to NPM INSTALL packages on WSL from VS Code. npm ERR! Error: EACCES: permission denied, rename '/mnt/d/DEVRepo/PWS/functions/node_modules/cssstyle' -> '/mnt/d/DEVRepo/...
  • 955
22 votes
5 answers
18k views

Can't connect VS Code to Linux machine for remote development

I am getting this error on VS Code and have no clue why it fails [15:14:59.543] Log Level: 2 [15:14:59.555] remote-ssh@0.51.0 [15:14:59.555] win32 x64 [15:14:59.560] SSH Resolver called for "ssh-...
22 votes
3 answers
25k views

How can I install vs-code-server manually and tell vs-code-remote?

When I try use remote-ssh connect to my server to install install vs-code-server, it hangs with these message: Install and start server if needed bash: no job control in this shell Installing... ...
  • 221
22 votes
1 answer
4k views

VSCode Remote WSL Downloading Server Every Time

Every time I open Remote WSL, it downloads server. Even after download is completed, when I open VSCode and Remote WSL again, it starts downloading again. How to solve this so that it doesn't download ...
21 votes
6 answers
9k views

Is it possible to use the "code" command in SSH'ed terminal to open VS Code on local machine with SSH extension?

Something I love about VS Code is that when I am using a terminal in WSL, I can run code file.txt, and it will open that file with VS Code on my local using the WSL remote extension. Is it possible ...
20 votes
9 answers
22k views

VS Code connect to WSL Ubuntu 20.04 LTS, fail with error: Could not fetch remote environment

A few days ago I was working just fine with VS Code connected to WSL Ubuntu 20.04, then I did some updating on WSL, Ubuntu 20.04 LTS and VS Code and now I can not connect to WSL 20.04, and I always ...
20 votes
10 answers
64k views

ssh in vscode error: Permission denied (publickey,password)

So I'm using the "Remote - SSH" plugin in VSCode to connect to my VPS and edit my code. I lost the connection, then had to hard-reset it after 30+ min. Now I can't access it with VSCode anymore [putty ...
  • 356
19 votes
14 answers
49k views

VSCode Remote SSH Connection Failed

I'm trying to use the Remote-SSH extension to edit files on a Debian server. The SSH connection is established correctly but then I get an error message : Failed to connect to the remote extension ...
  • 384
18 votes
4 answers
24k views

How to connect VSCode to GCP instances

I am trying to connect VSCode to my GCP instances but am unable to. From a terminal, I can ssh into the machines with gcloud compute ssh my_machine_name but I'm not sure how to translate that into ...
  • 4,525
18 votes
5 answers
24k views

WSL2 terminal does not recognize Visual Studio Code

When I try to execute code from WSL, like this: cmd.exe wsl code . I get the following error: /bin/bash: code: command not found However, if I execute the same command but first run cmd.exe as an ...
  • 3,156
18 votes
6 answers
15k views

Visual Studio Code Remote SSH uses Windows username instead of username in ssh_config

I'm using Visual Studio Code on Windows 7, along with Microsoft's Remote SSH extension. I added new remote host, and saved configuration in ssh_config file. When I open that file, everything looks ok,...
  • 963
17 votes
3 answers
15k views

How to run docker-compose inside VS Code devcontainer

I have this multi-container project comprised of 3 NestJS and 1 dotnet5.0 application. Besides the applications, the project depends on a RabbitMQ and an InfluxDB services (running as pure docker ...
  • 11.3k
17 votes
3 answers
7k views

Use host networking while building a VSCode devcontainer

How can I get VSCode to use host networking during the build of the container? In devcontainer.json, I can set "runArgs": ["--network=host"] but that only applies to running the ...
  • 6,719
16 votes
1 answer
2k views

How can I ensure VS Code Remote SSH server runs on a compute node of our cluster?

I would like to use VS Code Remote SSH to do development work on our institution's cluster. Our cluster uses an architecture with a login node that receives all SSH requests. We are discouraged from ...
15 votes
3 answers
9k views

Specify listening address 0.0.0.0 for forwarded port in VSCode Remote Containers

I am developing inside a docker container using the VSCode Remote Containers extension. I start a server inside the container which listens at port 3342 and would like to access the webpage using ...
15 votes
1 answer
8k views

alter PATH for VS Code Remote SSH

Using VS Code's new Remote SSH feature, how do I modify the PATH environment variable for its terminal? I've ssh'd into an Ubuntu 16.04 VM and it is not picking up /etc/profile or ~/.bash_profile. ...
14 votes
1 answer
9k views

Looking for IntelliJ Remote Dev experience similar to VS Code Remote Dev Extension Pack [closed]

VS Code allows a local development experience with source code and source execution on a remote machine: https://code.visualstudio.com/docs/remote/remote-overview Is there a similar tool to this for ...
14 votes
2 answers
9k views

How to set a remote connection to a Vagrant container using "Visual Studio Code Remote - SSH"?

I'm exploring the new set extensions called VSCode Remote Pack and I want to connect to a Vagrant container using the Remote Container extension. Using a Windows 10 OS, how could I do that? I tried ...
14 votes
2 answers
3k views

How to prevent new VS Code window from launching for remote ssh connections

When connecting to a remote machine using VS Code Remote SSH this act always opens a new VS Code Window. Is there a way to change this behavior to use the existing open window? Thanks
  • 3,305
13 votes
4 answers
12k views

VS code can't ssh to server: failed to create hard link

SETUP I have a windows 10 PC connecting to my linux server (ubuntu 18.04.2). I run/edit code on my powerful server by remotely accessing the server through VS code's ssh ability. It is super ...
13 votes
1 answer
2k views

VSCode - open remote from cli

I use the new VS Code remote feature all the time and it is superb. I'm wondering if it is possible to open a specific ssh host / folder from the cli. That way I can script a spin up of my dev ...
13 votes
1 answer
10k views

How can I use an env file to pass environment variables into a standalone vscode remote container?

I am using a standalone Go vscode remote container for development and would like to load environment variables into the container from a file. All examples I can find are using Docker Compose and ...
  • 25.4k
13 votes
3 answers
1k views

Is there a way to launch Visual Studio Code and force it to open in a Remote Container?

I regularly open Visual Studio Code via code . and then have to click the Re-open in Container button. Am I missing any shortcut to force it to do this from the command line?
  • 335
13 votes
4 answers
2k views

How to install VS Code extensions in a Dockerfile?

Is there a way to install VS Code extensions in a Dockerfile?
  • 570
12 votes
3 answers
15k views

VScode SSH extension keeps disconnecting after moving to a new location

I recently moved to a different country, but I work remotely and therefore I thought that my workspace wouldn't be interrupted. However, now that I'm trying to connect to my workspace through ssh in ...
  • 133
12 votes
1 answer
10k views

Working directory of Visual Studio Code tasks

What is the working directory of a Visual Studio Code task? According to the official documentation, the default should be the workspace directory, i.e., workspaceFolder, but running a task which ...
12 votes
3 answers
8k views

VSCode Remote Container - extensions not installing on dev container using docker-compose

I am having trouble getting extensions installed in the dev container using "Remote - Containers". I do not know if it's a bug, incorrect configuration on my end, or intended behaviour. Down below is ...
12 votes
1 answer
2k views

Configuring environment variables prior to creation of dev container

I am trying to integrate the Remote - Containers with my docker-compose.yaml. However, my compose file is making use of the variable substitution feature. services: command: yarn server ...
  • 5,074
11 votes
3 answers
10k views

How do I configure a different shell for a VS Code SSH Remote?

How do the change the shell used for VS Code's integrated terminal when I connect to an remote ssh workspace?
  • 56.3k
11 votes
11 answers
36k views

How do I resolve "Failed to parse remote port from server"?

I'm setting up a new remote host and every time I initiate it I get the following error output. How can I resolve this issue? Pseudo-terminal will not be allocated because stdin is not a terminal. ...
11 votes
1 answer
4k views

Open Containers in Remote SSH Hosts using VSCode

Using the Remote Development extension pack, Visual Studio Code is able to open a Docker container running on the current system, and to open a folder on a remote host connected using SSH. If there ...
  • 60.5k
11 votes
1 answer
2k views

Should I check in the VS Code dev container files? For example, the .devcontainer folder or .devcontainer.json file?

I created a new Dev Container in VS Code, and VS Code added .devcontainer folder to my workspace. Should I check this file in to git?
  • 56.3k

1
2 3 4 5
17