当前位置: 首页 > 知识库问答 >
问题:

无法建立到远程:spawn ENOTDIR的连接

梁福
2023-03-14

我使用VS代码Remote-SSH连接到远程机器以修改文件。当前,在尝试连接远程时-ssh:connect to host。我得到错误消息,“无法建立连接到”:spawn enotdir。

完整的错误日志如下:

[09:29:43.567] Log Level: 2
[09:29:43.568] remote-ssh@0.65.1
[09:29:43.568] darwin arm64
[09:29:43.569] SSH Resolver called for "ssh-remote+xps", attempt 1
[09:29:43.569] "remote.SSH.useLocalServer": true
[09:29:43.569] "remote.SSH.sshPath": undefined
[09:29:43.569] "remote.SSH.sshConfigurationFile": undefined
[09:29:43.569] "remote.SSH.useFlock": true
[09:29:43.569] "remote.SSH.lockfilesInTmp": false
[09:29:43.569] "remote.SSH.localServerDownload": auto
[09:29:43.569] "remote.SSH.remoteServerListenOnSocket": false
[09:29:43.570] "remote.SSH.showLoginTerminal": false
[09:29:43.570] "remote.SSH.defaultExtensions": []
[09:29:43.570] SSH Resolver called for host: xps
[09:29:43.570] Setting up SSH remote "xps"
[09:29:43.571] Acquiring local install lock: /var/folders/jf/rk7bz0g157x7yd5q_f726zyr0000gn/T/vscode-remote-ssh-xps-install.lock
[09:29:43.592] Looking for existing server data file at /Users/taramishra/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-xps-f30a9b73e8ffc278e71575118b6bf568f04587c8-0.65.1/data.json
[09:29:43.592] Using commit id "f30a9b73e8ffc278e71575118b6bf568f04587c8" and quality "stable" for server
[09:29:43.594] Install and start server if needed
[09:29:43.595] Checking ssh with "ssh -V"
[09:29:43.596] Finding installed ssh failed: spawn ENOTDIR
[09:29:43.599] Resolver error: Error: spawn ENOTDIR
    at ChildProcess.spawn (internal/child_process.js:407:11)
    at Object.spawn (child_process.js:557:9)
    at /Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:141985
    at new Promise (<anonymous>)
    at k (/Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:141906)
    at I (/Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:141857)
    at /Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:145959
    at _ (/Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:146024)
    at C (/Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:141636)
    at Object.t.getSshCommandPath (/Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:144744)
    at Function.create (/Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:262426)
    at async Object.t.tryInstallWithLocalServer (/Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:387852)
    at async /Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:293749
    at async Object.t.withShowDetailsEvent (/Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:407055)
    at async /Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:387177
    at async N (/Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:383945)
    at async Object.t.resolveWithLocalServer (/Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:386804)
    at async Object.t.resolve (/Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:297790)
    at async /Users/taramishra/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:127:110485
[09:29:43.601] ------

我已经尝试重新安装远程开发包,并清除了远程中的。vscode-server文件。他们似乎没有帮助。

共有1个答案

越雨泽
2023-03-14

巧合的是,我的VSCode今天也出现了这个问题!对我来说,它今天突然停止工作(可能与最新的VScode更新有关)。问题是VSCode再也找不到您的ssh程序了,而它以前是能够找到的。

  1. 转到Remote-SSH首选项(cmd+,并搜索Remote-SSH)。
  2. 找到标记为remote.ssh:path的字段。现在它可能是空白的,因为VSCode过去是自己查找可执行文件的。
  3. 输入ssh执行文件的绝对路径。如果不确定路径,可以在终端中运行which ssh并复制它打印出来的路径。
  4. 保存设置,然后重试SSH。为我工作!
 类似资料:
  • 我在A机上设置了伪分布式模式的Hadoop和Hbase,我正在B机上运行我的客户端(Java程序)(A机和B机可以互相通信)。但我这样做面临问题。 我的客户端代码如下所示: 配置config=HBaseConfiguration.create(); config.set(“HBase.ZookeePer.quorum”,zookeeperLocation);config.set(“hbase.zo

  • 最近我在用JavaEE做这个小项目,我需要使用derby数据库,但每次我去服务- 无法连接。无法建立到jdbc的连接:derby://localhost:1527//sample使用组织。阿帕奇。德比。jdbc。ClientDriver(java.netConnectException:在端口1527上连接到服务器本地主机时出错,消息为Connection拒绝:connect.)。 这个例外: 有

  • 当连接到远程主机以设置远程SSH连接时,我得到以下错误。

  • 问题内容: 我正在尝试使用jstatd用jps查询远程JVM,以便最终使用VisualVM对其进行监视。 我让jstatd使用以下安全策略运行: jstatd在带有1.6.0_10版本的HotSpot vm的64位Linux机器上运行。jstatd命令是: 我正在尝试从Windows 7计算机运行jps。由于防火墙的限制,我通过SSH隧道将RMI数据通过隧道传输到我的Windows计算机,这样jp

  • 当我试图将我的一台机器用作WinRM客户端以连接到另一台机器时,我的一台机器出现问题。场景是: Window 7上的问题机器(VM A)已经启用了WinRM(已经运行winrm快速配置,Enable-PSRemoting),然后我将远程机器(VM C)的IP添加到VM A的受信任主机中,然后运行Test-WSMan,我得到这个错误Test-WSMan: 客户端无法连接到请求中指定的目标。验证目标上

  • 我有一个docker compose,它包含Keyclope和Mailhog。我在keydeport中配置了Mailhog,但它不起作用。我在Powershell中试过MailHog,它很管用。有人能帮我找出它为什么不起作用吗? KeyClope上的Mailhog配置步骤: 首先我添加当前Keycloak用户的电子邮件地址(master@test.com)。 然后我像下面这样配置电子邮件 当我点击