Install terminal quit with output: bash: powershell: command not found; 试图写入管道不存在

I need to connect to server for running experiments. This is what I get when trying to connect to server with ssh-remote 0.50.0 and vscode 1.58.

3e276df8ca7e: running
Acquiring lock on /home/chenguiming/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679adfb3/vscode-remote-lock.chenguiming.c3f126316369cd610563c75b1b1725e0679adfb3
\ln /home/chenguiming/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679adfb3/vscode-remote-lock.chenguiming.c3f126316369cd610563c75b1b1725e0679adfb3.target /home/chenguiming/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679adfb3/vscode-remote-lock.chenguiming.c3f126316369cd610563c75b1b1725e0679adfb3     
Found existing installation at /home/chenguiming/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679adfb3...
Found running server...

*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
*

Checking server status on port 44769 with wget
3e276df8ca7e: start
sshAuthSock====
agentPort==44769==
osReleaseId==centos==
arch==x86_64==
webUiAccessToken====
tmpDir==/run/user/1211==
platform==linux==
3e276df8ca7e: end

I downgrade the Remote-SSH extension to 0.50.0 bcz some articles say that this version is more stable in connection (some also suggest to downgrade vscode to 1.37 if I recall well, but I didn’t try).
After referring to Thank you Friksel! , i.e., turn OFF remote.SSH.showLoginTerminal, which was suggested to be on when I followed the instructions online for first-time-setup, I resolved this issue and had a nice connection.

After I upgrade the Remote-SSH to 0.65.7, it failed again.
Install terminal quit with output: bash: powershell: command not found; 试图写入管道不存在_第1张图片
The terminal output:

[22:46:02.398] Using SSH config file "C:\Users\ming\.ssh\config"
[22:46:02.401] Remote command length: 5993/8192 characters
[22:46:02.401] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 57605 -F "C:\Users\ming\.ssh\config" ming powershell
[22:46:02.406] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[22:46:02.787] > [email protected]'s password:]0;C:\WINDOWS\System32\cmd.exe
[22:46:02.787] Got some output, clearing connection timeout
[22:46:02.788] Showing password prompt
[22:46:07.723] Got password response
[22:46:07.723] "install" wrote data to terminal: "***********"
[22:46:07.743] > 
[22:46:08.060] > bash: powershell: command not found
[22:46:09.347] "install" terminal command done
[22:46:09.348] Install terminal quit with output: bash: powershell: command not found
[22:46:09.348] Received install output: bash: powershell: command not found
[22:46:09.348] Failed to parse remote port from server output
[22:46:09.349] Resolver error: Error: 
	at Function.Create (c:\Users\ming\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.7\out\extension.js:1:64659)
	at Object.t.handleInstallOutput (c:\Users\ming\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.7\out\extension.js:1:63302)
	at Object.t.tryInstall (c:\Users\ming\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.7\out\extension.js:1:415135)
	at processTicksAndRejections (internal/process/task_queues.js:93:5)
	at async c:\Users\ming\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.7\out\extension.js:1:294918
	at async Object.t.withShowDetailsEvent (c:\Users\ming\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.7\out\extension.js:1:406463)
	at async Object.t.resolve (c:\Users\ming\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.7\out\extension.js:1:295994)
	at async c:\Users\ming\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.7\out\extension.js:127:110656
[22:46:09.361] ------

Hence, just downgrade the extension to 0.50.0 and turn off the remote.SSH.showLoginTerminal. Good luck!

你可能感兴趣的:(vscode,ssh)