I'm trying to setup a ssh server using my win10 PC. After following steps to setup the server, it is now can be connected via terminal from by laptop(win11).
However, if I use vscode extension Remote - SSH with connecting config :
Host 192.168.0.183
HostName 192.168.0.183
User User
Port 22
I always encounter Could not establish connection
:
[23:49:42.494] Got password response
[23:49:42.494] "install" wrote data to terminal: "**********"
[23:49:42.521] >
[23:49:42.815] > powershell : �L�k���� 'powershell' ���J�O�_�� Cmdlet�B��ơB���O�ɩΥi����{�����W�١C���ˬd�W�٫��r�O�_���T�A�p�G�]�t
[23:49:42.826] > ��|���ܡA�нT�{��|�O�_���T�A�M��A�դ@���C
��� �u��:1 �r��:1
+ powershell
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (powershell:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
[23:49:44.124] "install" terminal command done
[23:49:44.125] Install terminal quit with output:
[23:49:44.126] Received install output:
[23:49:44.129] Resolver error: Error:
at g.Create (c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:583926)
at c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:581767
at t.handleInstallOutput (c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:582462)
at t.tryInstall (c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:680469)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:642848
at async t.withShowDetailsEvent (c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:646166)
at async t.resolve (c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:643898)
at async c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:723024
[23:49:44.138] -----
Then I tried to use the laptop setting up as server and PC otherwise. It connect successfully with following output log :
[23:56:27.929] Got password response
[23:56:27.929] "install" wrote data to terminal: "************"
[23:56:27.951] >
[23:56:28.645] > Windows PowerShell
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> Install the latest PowerShell for new features and improvements! https://aka.ms/
> PSWindowsPS C:\Users\lspss>
> PS C:\Users\lspss> $uuid="d68ebbafd913"
> PS C:\Users\lspss> "${uuid}: running"
> d68ebbafd913: running
> PS C:\Users\lspss> "d68ebbafd913: pauseLog"
> d68ebbafd913: pauseLog
In comparison, the failed one have some random code I do not understand follow the powershell
, while the other success after Windows Powershell
.
I have tried to reinstall the ssh-server on my PC, and also tried using other laptop as client, which all failed.