Skip to content
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

remote explorer - containers: Shell server terminated (code:255, signal: null) #7035

Closed
soribido opened this issue Aug 8, 2022 · 3 comments
Assignees
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster

Comments

@soribido
Copy link

soribido commented Aug 8, 2022

  • VSCode Version: 1.70.0
  • Local OS Version: Window 10
  • Remote OS Version: Ubuntu 20.04.2
  • Remote Extension/Connection Type: SSH/Containers/
  • Logs:
    Shell server terminated (code: 255, signal: null) 'wmic'��(��) ���� �Ǵ� �ܺ� ����, ������ �� �ִ� ���α׷�, �Ǵ� ��ġ ������ �ƴմϴ�. node:child_process:923 throw err; ^ Error: Command failed: wmic process where (commandline like "%ssh-askpass.bat%") get processid,parentprocessid /format:csv 'wmic'��(��) ���� �Ǵ� �ܺ� ����, ������ �� �ִ� ���α׷�, �Ǵ� ��ġ ������ �ƴմϴ�. at checkExecSyncError (node:child_process:846:11) at Object.execSync (node:child_process:920:15) at Object. (node:electron/js2c/asar_bundle:5:12704) at Object. (c:\Users\phase.vscode\extensions\ms-vscode-remote.remote-containers-0.243.0\dist\common\sshAskpass.js:5:808) at Module._compile (node:internal/modules/cjs/loader:1163:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1216:10) at Module.load (node:internal/modules/cjs/loader:1035:32) at Module._load (node:internal/modules/cjs/loader:876:12) at Function.c._load (node...

Steps to Reproduce:

I want to work in a docker container on a remote server using vscode.
I can access to remote server using ssh, but I can't access docker container on a remote server.
I can access docker container shell using docker extension and right mouse click,
but it doesn't work when choosing "Attach Visual Studio Code". (same error message)

  1. Remote-SSH: Connect to Host
  2. Enter the password
  3. open Remote Explorer extension: SSH targets -> Containers
  4. Error message
@chrmarti
Copy link
Contributor

This could be an issue with the SSH password prompt. Could you try using a public key for authentication and add the private key to your localhost's ssh-agent to avoid the prompt and see if that works?

@chrmarti chrmarti self-assigned this Aug 10, 2022
@chrmarti chrmarti added containers Issue in vscode-remote containers info-needed Issue requires more information from poster labels Aug 10, 2022
@soribido
Copy link
Author

Now I can access to remote docker container. Thank you!

@elsiehupp
Copy link

I found my way to this Issue because I was having the same problem on a (bare metal, i.e. not WSL2) Ubuntu remote (from a macOS client).

The GitHub instructions for "Adding your SSH key to the ssh-agent" are a top search result for the phrase "ssh-agent save passphrase", but they only cover macOS (and I had already done everything in the article), so I had to dig up unofficial instructions for Linux. This gist "How to use ssh-agent to cache your SSH credentials?" with instructions for Linux was the top search result for "ssh-agent save passphrase linux", and following the instructions on my Ubuntu remote fixed the problem for me.

Basically the error message provided—remote explorer - containers: Shell server terminated (code:255, signal: null)—should be more descriptive, with, e.g., a link to a support article explaining how to add one's SSH keys to one's ssh-agent. One should not have to google a first-party error message, look in a closed bug report, google text from the bug report, look at a quasi-first-party support article, google text from that support article, and then, finally, follow a third-party tutorial just to be able to use the basic functionality of a first-party extension.

Or, I dunno, maybe VS Code could just add support for SSH-key passphrases? This is a long-running problem.

(The weirder thing is that I wasn't having this problem previously, and I'm not sure what changed that broke things, unless the issue is new for this particular VS Code release. I had been using SSH Agent Forwarding to work around the lack of a passphrase interface for Git, so maybe the recent VS Code release broke SSH Agent Forwarding for remote containers, idk?)

I can open a new Issue regarding the error popup itself if that would help. I'm just commenting here because this is a top google result for the error message, and my experience is relevant to any future visitors needing to fix the same problem themselves.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants