首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >无法使用vscode远程ssh,但可以直接使用ssh

无法使用vscode远程ssh,但可以直接使用ssh
EN

Stack Overflow用户
提问于 2021-09-14 15:25:43
回答 1查看 499关注 0票数 0

问题

然后我重新安装了我的服务器system.Before,我可以使用远程ssh normally.However,我不能使用远程ssh连接到我的服务器anymore.But,我仍然可以使用ssh直接连接到服务器。

我猜它设法进入了系统,但不知何故出了故障。

错误日志如下:

代码语言:javascript
运行
复制
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-77-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Tue 14 Sep 2021 09:56:58 PM CST

  System load:  0.07              Processes:             117
  Usage of /:   6.5% of 59.00GB   Users logged in:       1
  Memory usage: 10%               IPv4 address for eth0: 10.0.12.2
  Swap usage:   0%

 * Super-optimized for small spaces - read how we shrank the memory
   footprint of MicroK8s to make it the smallest full K8s around.

   https://ubuntu.com/blog/microk8s-memory-optimisation

ready: 6425958cce28
Linux 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021
6425958cce28: running
bash: line 1: _exitcode: command not found
bash: line 2: syntax error near unexpected token `elif'
bash: line 2: ` elif [[ $ALLOW_CLIENT_DOWNLOAD == "1" ]]; then'
-sh: 4: function: not found
-sh: 69: [[: not found
-sh: 90: [[: not found
-sh: 155: Syntax error: "(" unexpected (expecting "then")
Transferred: sent 17180, received 4016 bytes, in 0.5 seconds
Bytes per second: sent 35433.6, received 8283.0
local-server-1> ssh child died, shutting down

[21:56:58.587] Failed to parse remote port from server output
[21:56:58.588] Resolver error: Error: 
    at Function.Create (/Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:64659)
    at Object.t.handleInstallOutput (/Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:63302)
    at Object.e [as tryInstallWithLocalServer] (/Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:387573)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async /Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:294473
    at async Object.t.withShowDetailsEvent (/Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:406463)
    at async /Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:386112
    at async E (/Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:382710)
    at async Object.t.resolveWithLocalServer (/Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:385728)
    at async Object.t.resolve (/Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:295870)
    at async /Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:127:110656
[21:56:58.592] ------

已尝试

我尝试从主机上删除know_hosts文件,重新安装远程ssh插件,但无法工作

我对remote-ssh还是个新手,希望能给我更详细的解决方案。

谢谢:)

EN

回答 1

Stack Overflow用户

发布于 2021-09-14 16:27:41

我降级了remote- zsh,然后我把我的默认shell改成了zsh,然后升级了remote-zsh,它又开始安装'.vscode-server‘文件了,它神奇地工作了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69180558

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档