我想使用 vscode 的
Remote SSH
连接到我组织的 jupyterhub 服务器,但是它因此报告而崩溃:
[17:48:27.180] Running script with connection command: ssh -T -D 56752 "jupyterhub.whatever.com" bash
[17:48:27.183] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[17:48:27.575] > 系统无法执行指定的程序。
> ]0;C:\WINDOWS\System32\cmd.exe
[17:48:27.576] Got some output, clearing connection timeout
[17:48:28.857] "install" terminal command done
[17:48:28.858] Install terminal quit with output: ]0;C:\WINDOWS\System32\cmd.exe
[17:48:28.858] Received install output: ]0;C:\WINDOWS\System32\cmd.exe
[17:48:28.858] Failed to parse remote port from server output
[17:48:28.859] Resolver error: Error:
at g.Create (c:\Users\k6789\.vscode\extensions\ms-vscode-remote.remote-ssh-0.90.1\out\extension.js:1:585222)
at t.handleInstallOutput (c:\Users\k6789\.vscode\extensions\ms-vscode-remote.remote-ssh-0.90.1\out\extension.js:1:583874)
at t.tryInstall (c:\Users\k6789\.vscode\extensions\ms-vscode-remote.remote-ssh-0.90.1\out\extension.js:1:681023)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async c:\Users\k6789\.vscode\extensions\ms-vscode-remote.remote-ssh-0.90.1\out\extension.js:1:643908
at async t.withShowDetailsEvent (c:\Users\k6789\.vscode\extensions\ms-vscode-remote.remote-ssh-0.90.1\out\extension.js:1:647224)
at async t.resolve (c:\Users\k6789\.vscode\extensions\ms-vscode-remote.remote-ssh-0.90.1\out\extension.js:1:644958)
at async c:\Users\k6789\.vscode\extensions\ms-vscode-remote.remote-ssh-0.90.1\out\extension.js:1:726917
[17:48:28.863] ------
这是我的 SSH 配置:
Host jupyterhub.whatever.com
HostName jupyterhub.whatever.com
IdentityFile ~/.ssh/id_rsa
PreferredAuthentications publickey
User MyUserName
我想这个问题不能帮助我,那么如何解决这个问题呢?
尝试删除 C:/Users/user/.ssh/known_hosts 中的内容并连接同一主机。 我遇到了类似的问题,看起来 Visual Studio 创建了一个新的配置文件。
我不知道是否是完全相同的情况,但就我而言,由于远程系统中磁盘容量不足,因此出现了类似的日志。
%df-h 已使用的文件系统大小 可用 使用% 安装于 devtmpfs 7.7G 0 7.7G 0% /dev tmpfs 7.7G 4.0K 7.7G 1% /dev/shm tmpfs 7.7G 186M 7.6G 3% /运行 tmpfs 7.7G 0 7.7G 0% /sys/fs/cgroup /dev/vda2 598G 598G 20K 100% / /dev/vda1 2.0G 225M 1.8G 12% /boot tmpfs 1.6G 0 1.6G 0% /运行/用户/1001
当我删除不需要的文件时,我能够再次连接。 已经晚了,但我希望它有帮助,因为其他人可能会寻找它。
我在 VS Code 中也遇到了同样的问题。我能够通过从终端使用 SSH 并在主机上运行以下命令来解决它:
rm -f .vscode-server/*.log