-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test: Connect to Dev Container over tunnel / SSH on Windows #9123
Comments
The lowlight here is that there were really no setup instructions and I had to go through installing Docker for Windows, OpenSSH, etc. to setup everything. TPIs need setup instructions, anything else just leaves people very frustrated... The highlight is that I am able to open a dev container from Linux (running in Parallels VM) in Windows connected through a tunnel 🤯 I ran out of time testing SSH though. |
@bpasero Sorry for the trouble and thanks for the feedback. I have added additional instructions based on that. @roblourens I found the SSH setup especially difficult to get working, maybe you have a recipe to share for that? |
This does seem a bit much for a complexity 4. Even a lot to ask of a complexity 5. I'm testing macOS and I need a Windows dev box, and a Linux VM with an SSH proxy to test all the features. A lot of these things I don't have and must set up for the first time just to get into a workable state for this TPI |
@lramos15 If you have an x64 Mac, you can use a Window VM on Parallels to run the SSH server. (This currently doesn't work with ARM Macs because these do not yet support nested virtualization.) |
@bpasero did you get this working in a dev box? I can't get the ssh server working and I wonder if they are just blocking ssh aggressively there like they do in our azure subscription. I generally just follow https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=powershell but windows ssh is hard to troubleshoot. |
Tested with dev containers, could not get SSH to work with the dev box configuration. Not sure what the best approach is / how the jumpbox works |
A simpler approach is to use an Azure VM. That has its own hurdles, so I underestimated the complexity of this test item. My notes from setting up a Windows Azure VM with Docker for the future: Create Windows Azure VM with Docker
|
Where do logs for the dev containers extension go? I set the log level to "trace" but I don't see an output channel |
@roblourens for this TPI I had to use a second machine, which is a full Windows machine where I was able to install Open SSH server, Docker for Windows. |
The logs go to a terminal: |
Coming to think about it: For testing with Windows as the local machine, a single Windows machine might be sufficient. Just connect to localhost as the SSH server. @roblourens Is that how you are testing? |
Yeah, I will test it that way, I just wanted to do a "real" remote setup at first and try dev boxes |
Blocked on #9128 |
@roblourens Did you get ssh on the devbox working? When I try |
No, I tested it with a local VM. Thanks for the tip |
Figured out how to use WSL to run the client and connect to the Windows host with SSH. So a DevBox can be used to test Windows and Linux clients connecting to a Windows SSH server. For macOS as the client, a Windows Azure VM appears to be the simplest setup (see #9123 (comment)). DevBox Setup
Access from WSL
|
Refs: #9095
Complexity: 4
Create Issue
Note: The 'Open Folder' picker for remote currently has a bug where you can get a Windows workspace folder without drive letter. The workaround is to manually enter the drive letter before pressing Enter to accept. (microsoft/vscode#195938)
Note 2: Make sure the CLI you use to start the tunnel (
code-insiders tunnel
) is at the latest version to include all bug fixes.Dev Containers: Reopen Folder in Container
.git clone ...
a private repository.ssh-add -l
in the container that your key is available.Dev Containers: Attach to Running Container
.Additional Instructions
Tunnel
code-insiders tunnel
, accept EULA, sign-in and create tunnel.Remote (Tunnels/SSH)
at the top.Dev Containers: Reopen Folder in Container
.SSH
The main hurdle is to get
ssh username@windowsmachine
working in a terminal. Afterwards Remote-SSH can be used to connect to it. The main problem is reaching the SSH port depending on network rules.Prep on Windows:
Windows-Key > Optional Features
that OpenSSH Server is installed.Windows-Key > Services
.Variants to connect:
ProxyJump
option in~/.ssh/config
).ssh -R 2222:localhost:22 linux-azure-vm
to set up a tunnel.~/.ssh/config
I used the following to configure the proxy:The text was updated successfully, but these errors were encountered: