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, usechsh
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后直接设置控制台就行了😂文章来源:https://www.toymoban.com/news/detail-601824.html
文章来源地址https://www.toymoban.com/news/detail-601824.html
参考资料
- https://code.visualstudio.com/docs/remote/troubleshooting
- https://github.com/microsoft/vscode-remote-release/issues/5099
- https://github.com/microsoft/vscode-remote-release/issues/38
到了这里,关于Vscode ssh卡死在setting up ssh host的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!