VS Code Remote - windows 路径中有空格 - ssh 错误
VS Code Remote - windows path with whitespace in it - ssh error
我想通过 ssh 连接到我的服务器。我已经在 VS Code 中安装了远程开发包,我可以在 VSC 终端中通过 ssh 连接,但不能通过 ssh 'panel'。当我这样做时,我得到:
[10:45:40.155] Spawned 9044
[10:45:40.266] > local-server> Spawned ssh: 7472
[10:45:40.292] stderr> OpenSSH_7.9p1, OpenSSL 1.1.1a 20 Nov 2018
[10:45:41.149] stderr> debug1: Server host key: ecds...56 SHA256:5SDO....
[10:45:41.183] stderr> 'C:\Users\Name' is not recognized as an internal or external command,
[10:45:41.183] stderr> operable program or batch file.
[10:45:41.186] stderr> Host key verification failed.
[10:45:41.189] > local-server> ssh child died, shutting down
[10:45:41.197] Local server exit: 0
[10:45:41.198] Received install output: OpenSSH_7.9p1, OpenSSL 1.1.1a 20 Nov 2018
debug1: Server host key: ecdsa-s.....
'C:\Users\Name' is not recognized as an internal or external command,
operable program or batch file.
Host key verification failed.
如您所见,我有 C/users/Name 姓氏/... 导致麻烦的用户 - 它被解析为姓名和姓氏之间的空格
它可能在它试图达到这个时发生:
[10:45:40.091] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\Users\Name Surname\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\local-server\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\Users\Name Surname\AppData\Local\Programs\Microsoft VS Code\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\Users\Name Surname\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\.\pipe\vscode-ssh-askpass-1e1200d27-sock"}
我的问题是,我该怎么办?
在扩展设置中搜索:@ext:ms-vscode-remote.remote-ssh Path
然后在路径下指定 ssh 安装的绝对路径。在我的 windows 安装中,它位于此处:C:\Windows\System32\OpenSSH\ssh.exe
我想通过 ssh 连接到我的服务器。我已经在 VS Code 中安装了远程开发包,我可以在 VSC 终端中通过 ssh 连接,但不能通过 ssh 'panel'。当我这样做时,我得到:
[10:45:40.155] Spawned 9044
[10:45:40.266] > local-server> Spawned ssh: 7472
[10:45:40.292] stderr> OpenSSH_7.9p1, OpenSSL 1.1.1a 20 Nov 2018
[10:45:41.149] stderr> debug1: Server host key: ecds...56 SHA256:5SDO....
[10:45:41.183] stderr> 'C:\Users\Name' is not recognized as an internal or external command,
[10:45:41.183] stderr> operable program or batch file.
[10:45:41.186] stderr> Host key verification failed.
[10:45:41.189] > local-server> ssh child died, shutting down
[10:45:41.197] Local server exit: 0
[10:45:41.198] Received install output: OpenSSH_7.9p1, OpenSSL 1.1.1a 20 Nov 2018
debug1: Server host key: ecdsa-s.....
'C:\Users\Name' is not recognized as an internal or external command,
operable program or batch file.
Host key verification failed.
如您所见,我有 C/users/Name 姓氏/... 导致麻烦的用户 - 它被解析为姓名和姓氏之间的空格
它可能在它试图达到这个时发生:
[10:45:40.091] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\Users\Name Surname\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\local-server\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\Users\Name Surname\AppData\Local\Programs\Microsoft VS Code\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\Users\Name Surname\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\.\pipe\vscode-ssh-askpass-1e1200d27-sock"}
我的问题是,我该怎么办?
在扩展设置中搜索:@ext:ms-vscode-remote.remote-ssh Path
然后在路径下指定 ssh 安装的绝对路径。在我的 windows 安装中,它位于此处:C:\Windows\System32\OpenSSH\ssh.exe