Work-Around and Discussion for microsoft/vscode-remote-release#24
This repository was made to provide files and instructions for implementing the work-around for VSCode Remote-SSH installation on OSX. Currently, an issue exists tracking an official solution.
Please keep all questions regarding this work-around here in this repository so that the official issue is not clogged like a forum thread.
Please create an Issue here to ask your question. Please check Closed Issues before asking your question.
- Install Docker.
- Open Terminal
mkdir vscode-hack
cd vscode-hack
vi Dockerfile
docker build -t ssh .
docker run -d -p 2222:22 --name ssh -v ${HOME}:/opt --restart unless-stopped ssh
Within VSCode:
- Click Remote Explorer
- Click Settings
- Edit .ssh/vscode.config
vscode.config
Host OSX
HostName IP.AD.DR.ESS
User root
Port 2222
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
Do not be decieved, this is a BACKDOOR into your system. This has not been vetted by a security team, nor is intended to anything more than a "work-around".
- The directory you expose to docker is available for anyone who can figure out or crack your container's password.
- This exposes a default linux container which can run binaries on your remote machine as root. You have been warned.
In the docker run
statement above, I am mapping my home directory to /opt
on the Remote Host. This may or
may not be what you want, depending on your development environment. If you map to /opt
, upon first connection,
Docker will attempt to enumerate all directories and prompt you for access. If you have mapped to your
home directory, Docker may prompt for additional permissions ("Documents", "Desktop", "Downloads", etc) on the
remote.
"Docker" would like to access files in your Documents folder.
[ Don't Allow ] [ OK ]
If you click [ Don't Allow ]
, you will not be able to remotely see files in that folder.