
My next guess was that key authentication was disabled for some super-strange reason, but I had to confirm this. A lot of the online “tips” talk about setting the right ACLs on the %UserProfile%\.ssh\authorized_keys file to ensure they are restrictive enough, and I sank a ton of time down this path without success. No matter what I did, the server would not accept my key: it would always fall back to password-based authentication even after the client correctly offered the key during connection establishment. Setting up the authorized keysīut there was one more problem. With this, ssh-add started working as expected. Set-Service -Name ssh-agent -StartupType 'Automatic' Start-Service ssh-agentĪlright. Make sure to use the correct version printed in your case:
#Windows openssh server install#
Install the SSH server optional feature by querying the exact package name and then installing it. The instructions worked without a problem and I could redirect you to them, but I’m reproducing them here for completeness: I’m sure I’ll need these in the future again.
#Windows openssh server windows 10#
You can consider these to be my lab notes to get my Windows 10 laptop (build 19041) to connect to my VM on a Windows Server 2019 machine using SSH with key-based authentication. I spent about an hour figuring things out, in part because the official documentation is broken, and in part because all the “fixes” I found online in arbitrary forums were as misleading as you can imagine. Unfortunately, setting up SSH with key-based authentication wasn’t trivial. Thus I want to see how far I can get by with using VSCode and a terminal, both connected to the remote VM via SSH. And this is a good thing because VSCode has excellent remote development abilities- including debugging-by means of a trivial SSH connection.

Bring back EDIT.COM!)įurthermore, it seems like I’m free to choose any development environment I want (unlike at Google, where there were only a few blessed ways to operate) and some of my new teammates use VSCode. I don’t understand how there is no built-in text-based editor.

Or will I?Īs surprising as it may sound, recent versions of Windows ship with OpenSSH and, combined with PowerShell, it should be possible to operate a remote machine without the need for a graphical interface. But I now have to use remote Windows VMs for Azure development because that’s the way it is, so I’ll have to cope. That’s why I ended up working on Bazel’s macOS port at Google: I wanted to expand the ability to develop on Macs natively instead of relying on remote Linux workstations. The way it breaks keybindings is something that messes with my muscle memory pretty badly.
