SSH_AUTH_SOCK is not set when connecting to remote containers #2926
Labels
bug
Issue identified by VS Code Team member as probable bug
containers
Issue in vscode-remote containers
info-needed
Issue requires more information from poster
Connecting to a remote container, SSH agent forwarding doesn't work and SSH_AUTH_SOCK is an empty string. Setting SSH_AUTH_SOCK to point at the vscode-ssh-auth socket in
/tmp
gets it to work.Steps to Reproduce:
For an exemplar container, I've followed this vscode tutorial:
Then from vscode, click through
Remote Explorer -> right-click on container -> Attach to Container
.Within the window that opens inside the container, create a new terminal.
Test out ssh with
ssh -T git@github.com
. It'll fail.Run
echo $SSH_AUTH_SOCK
. It'll return an empty string.Run
export SSH_AUTH_SOCK=$(ls -t /tmp/vscode-ssh-auth* | head -1)
to set SSH_AUTH_SOCK.Test out ssh with
ssh -T git@github.com
. It'll work!Does this issue occur when you try this locally?: N/A
Does this issue occur when you try this locally and all extensions are disabled?: N/A
Notes
No extra extensions are installed remotely.
This might be related to this issue, but the poster there reports SSH_AUTH_SOCK being set.
Here's my dev-container logs:
The text was updated successfully, but these errors were encountered: