4

I have been having this problem since last week. The remote extension worked before this.

When, I try to ssh I get this pop up error:

The terminal process "C:\WINDOWS\System32\cmd.exe /c (type "C:\Users<home dir>\AppData\Local\Temp\vscode-linux-multi-line-command--863954789.sh" | "C:\Program Files\Git\usr\bin\ssh.exe" -T -D 59760 -F "C:\Users<home dir>.ssh\config" bash) & exit /b 0" terminated with exit code: 255.

and in the terminal I am seeing this:

[11:03:29.127] Terminal shell path: C:\WINDOWS\System32\cmd.exe[11:03:30.542] "install" terminal command done[11:03:30.542] Install terminal quit with output: [11:03:30.556] Resolver error: Error: Got bad result from install script

I am using windows git ssh executable and I can ssh from within GIT bash just fine, and I am pointing to the git ssh executable directly (I can't use the Windows ssh due to GPO, and admin just said would be easier to use the git ssh).

Anyone have any ideas?

I look up error code 255 and the files etc are all there, so i am not sure why that error is being thrown.

My ssh config file looks like this:

Host <hostname>
    HostName <host_ip>
    User <user_name>
    Port 22
    GlobalKnownHostsFile C:\Users\<home_dir>\.ssh\known_hosts
    ServerAliveInterval 10
    IdentityFile c:\Users\<home_dir>\.ssh\id_rsa

Thanks!

Waseem Khan
  • 41
  • 1
  • 3

2 Answers2

4

Check first if this is similar to microsoft/vscode-remote-release issue 2805.

This would show up when the server is running but has stopped responding to requests for some reason, and restarting the server would fix it.

That issue suggested:

  • after use following to kill remote vs server, it's fine now:

     VSCode -> View -> Command Palette -> input "remote" -> 
     Select Remote-SSH: Kill VS Code Server on Host...
    
  • Or: I could connect after I removed all files in ~/.vscode-server on the remote Linux server.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks. I still get the same error as above when I kill the vs coder server on host option. Also, removing .vscode-server doesn't fix it either. – Waseem Khan Jan 13 '21 at 11:33
  • @WaseemKhan did you try and restart the remote server (if possible)? – VonC Jan 13 '21 at 11:37
  • Just tried it now. Same result. I get the same result on different remote machines. – Waseem Khan Jan 13 '21 at 12:59
  • @WaseemKhan OK, the problem seems to be at the source of the SSH call, the local machine, not at the destination. Maybe a problematic Windows update? – VonC Jan 13 '21 at 13:02
  • Yeah, that could be it. Its a corporate machine and I don't control the updates. I did check with my colleagues and I am the only one having this issue. – Waseem Khan Jan 13 '21 at 17:49
  • Did you find a solution yet? I am facing the same problem. – Ishan Dutta Mar 10 '22 at 10:27
  • @IshanDutta None, beside https://github.com/microsoft/vscode-remote-release/issues/2805#issuecomment-708261041 – VonC Mar 10 '22 at 10:28
2

I had the same problem, the issue was caused because cmd.exe was returning 1 after uninstalling Anaconda.

Fixed it running this command in powershell:

C:\Windows\System32\reg.exe DELETE "HKCU\Software\Microsoft\Command Processor" /v AutoRun /f

Source

Even if it is not the case for you, verify your cmd.exe works fine (not just Powershell)

Daniel Viaño
  • 485
  • 1
  • 9
  • 26
  • 1
    Thousand thanks Would never found this issue myself – vii Mar 11 '23 at 19:46
  • I had the same problem. I wasn't sure if I should change something in registry but then I read the what was happening on VS code console, it indicated a problem with cmd.exe. That's when I became confident about making changes in registry. I followed the instructions given in this postn which worked for me. https://github.com/microsoft/vscode-remote-release/issues/5803#issuecomment-967792530 – Sarthchoudhary Mar 26 '23 at 17:20