所以我在VS代码远程SSH方面遇到了很多问题。我在九月份才开始使用它,之前使用Atom,这个月我遇到了很多问题。我最终卸载了两次vscode,试图解决它,并删除了linux机器主目录中的.vscode服务器文件夹。
现在,我甚至不能使用VS代码ssh到我的环境中。它不断地给出这个错误。这来自.vscode服务器/.log文件。
*
* Visual Studio Code Server
*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license https://aka.ms/vscode-remote/license
*
Extension host agent listening on 35175
[02:21:35] Extension host agent started.
[02:21:46] No ptyHost heartbeat after 6 seconds
[02:21:47] ptyHost was unable to resolve shell environment Error: Unable to resolve your shell environment in a reasonable time. Please review your shell configuration.
at Timeout.<anonymous> (/home/kbree/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/out/vs/server/remoteExtensionHostAgent.js:85:55472)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
我使用的是Bash shell。然而,事实上,我做到了。我必须重新启动服务器才能完成。不知道为什么。为了将来参考,我运行了
sudo systemctl reboot
这就解决了问题。