vscode-remote-release
vscode-remote-release copied to clipboard
Use default SSH_AUTH_SOCK on Windows
The ssh-agent available in Windows as a service listens on \\\\.\\pipe\\openssh-ssh-agent by default. In the Dev Containers extension I use this as the default value for SSH_AUTH_SOCK when that variable is not set. This makes ssh work with the ssh-agent without the need to set SSH_AUTH_SOCK by the user. I suggest to do the same in Remote-SSH.
I believe this might be the root cause of SSH agent not working well for me (using OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2, and Remote.SSH: Path points to that installation) using the remote extension; I see that two "install" panels open, one of which demands my key's passphrase while the other does not. The only difference I can see is the following is present in the one which works (which succeeded with no passphrase prompt):
The following extensions want to relaunch the terminal to contribute to its environment: Remote - SSH
with its only environment contribution being setting SSH_AUTH_SOCK=/run/user/1003/vscode-ssh-auth-sock-314281633. The failed panel did load that contribution. If I do let said panel reload for that, then I get effectively kicked out of the remote, forced to enter my passphrase to continue, while I can just close the failed one a couple times without issue. Setting SSH_AUTH_SOCK as a Windows user environment variable then breaks both panels.