Vscode ssh卡死在setting up ssh host

VScode ssh卡死在setting up ssh host:initializing vscode server

问题描述

VScode 用ssh插件连接远程Ubuntu服务器时,卡死在setting up ssh host:initializing vscode server

网上的一些方法如手动安装VScode server或者修改VScode setting等方法都没有用

等待若干时间后,VScode结束setting up并在out输出错误:

在这里插入图片描述

解决方法

官网文档中有一句话:

Some users launch a different shell from their .bash_profile or other startup script on their SSH host because they want to use a different shell than the default. This can break VS Code’s remote server install script and isn’t recommended. Instead, use chsh to change your default shell on the remote machine.

原来是Ubuntu的默认shell设置为zsh就会报错,还原shell为bash就没有问题了

chsh -s /bin/bash

但是oh-my-sh太美观了,还是想在VScode中用zsh怎么办?

这个问题折腾了我半天时间,后来发现解决方法很简单:在VScode连接到remote后直接设置控制台就行了😂

在这里插入图片描述

参考资料

  1. https://code.visualstudio.com/docs/remote/troubleshooting
  2. https://github.com/microsoft/vscode-remote-release/issues/5099
  3. https://github.com/microsoft/vscode-remote-release/issues/38
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值