-
Notifications
You must be signed in to change notification settings - Fork 779
VSCode Remote between two AAD-joined Windows PCs is not very seamless #1707
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
Comments
I was able to work around the However, I'd really prefer to avoid storing my PAT in the environment, and be able to use my logon credentials instead. |
One common reason for GSSAPI authentication not working under Active Directory is a mismatch between the provided and the allowed Encryption Types in Active Directory. Windows users usually don't notice if their Kerberos setup is broken, as Windows very quietly falls back to the far less secure NTLM authentication protocol. OpenSSH does not support NTLM authentication, so that's when users usually discover that their Kerberos setup was broken all the time. What encryption type does Sadly, it is 2020, and Active Directory still does not enable Kerberos AES encryption types everywhere by default (presumably because of all those many mission-critical Windows 2000/XP machines still out there that only speak RC4 :-( ). Another common reason for Kerberos not working is DNS problems, i.e. if a client not being able to find the realm and the associated KDC from the FQDN, or the FQDN not being provided, or not available via a reverse-DNS lookup. Once you got interactive GSSAPI authentication/delegation to work with
to your |
I'm a n00b on most of this... I was able to confirm that The configuration is a bit odd, and DNS issues could definitely be contributing... The client and server machines are both AAD-joined, and are connected to the same local subnet on my home network. For some reason, I can't resolve the server name at all from the client machine, even when the VPN connection is active, and have to connect by IP instead. Maybe that's a part of the problem? |
I have no expertise at all with AAD (assuming the first A is something to do with Azure). But from years of experience with fixing Kerberos issues, I do recommend making sure that the server's name resolves and reverse resolves well in DNS. Kerberos needs a host name that it can map to a server principal name (SPN). E.g., Kerberos usually does not work for logging into a server addressed just via just its numerical IP address. Both client and server need to agree on what the server's SPN is. Switching on logging helps. On Linux use |
@mgkuhn my home network configuration has changed, and forward name lookup is working now. I'm not certain how to verify that reverse-lookup is also working, do you have a suggestion? I tried enabling Windows Kerberos logging per the link you referenced, but I didn't see anything in the logs at all when I try to connect (looking in Event Viewer under Windows Logs/System). I'm still just getting |
Unfortunately I'm facing the same issue at the moment. |
"OpenSSH for Windows" version
OpenSSH_for_Windows_8.1p1
Server OperatingSystem
Windows 10 20H2
Client OperatingSystem
Windows 10 2004 Insider Preview (20214.1001)
What is failing
My scenario is using VSCode Remote to connect between my laptop (client) and PC (server) so that I can use the full power of the PC to build, etc. while running the VSCode editor locally on the laptop. Both PCs are running Windows and are AAD-joined. There are a few "speed-bumps" that make configuring this difficult and clunky:
git
commands fail to find my credentials since the shell is running in session 0 (non-interactive). (See also CMDKEY fails to add credential in ssh session 0 #996 which is related.) My hope is that once GSSAPI authentication works in this scenario, the resulting session will have full access to my credentials and resolve this, but I'm not sure whether it will actually work that way...As for the specifics of attempting to log in with GSSAPI, I enabled this on the server by adding
GSSAuthentication yes
tosshd_config
and restarting the service. Then I connected from the client usingssh -K
, but this just fails withGSS_S_FAILURE
in the verbose logs, and moves on to interactive keyboard login.The text was updated successfully, but these errors were encountered: