I was able to connect to a Linux server from my Windows 10 PC using VSCode's Remote-SSH extension without any issues before. However, I am now facing a strange problem where I get an error message that says:
Could not establish connection to "MyServerName": Got bad result from install script
I have tried reinstalling VSCode and also tried to delete the file C:\Users\<your_user_name>\.ssh\known_host
, but none of them worked for me.
Furthermore, I noticed that I cannot open cmd.exe normally on my Windows PC. Whenever I try to open it, it just pops up and then closes immediately, while PowerShell works fine.
I suspect that this might be the cause of my issue. If I can solve the issue with cmd.exe crashing, then the Remote-SSH issue might also be resolved.
After noticing the issue with cmd.exe crashing, I discovered that both "Windows Terminal" and "wt.exe" were missing. Despite attempting to reinstall Windows Terminal from the Microsoft Store, I am still unable to open cmd.exe as I could before.
reference solved reinstall terminal's method:
- Path and Name of exe file of windows terminal preview
- Windows 11 Can't Find "wt.exe"? Here's How to Fix It
- Chinese solution - vscode remote get bad result from install script
Could someone please help me with this issue? I have been stuck on this for a long time.