Arm*_*e2k 7 ssh visual-studio-code
我尝试通过 VS Code Remote-SSH 连接到我的共享服务器,但每次都会出现超时错误,并显示以下错误消息。此错误仅在 VS Code Remote-SSH 中发生,当使用其他客户端(Putty、Termius)时,连接工作正常。
请注意:这是一个共享服务器,我可以访问 SSH,但没有sudo权限并通过 port 连接1394。此外,错误通知弹出窗口最终会显示Could not fetch remote environment。由于它在 Putty 中运行良好,我最好的猜测是 VS-Code 中有一些设置需要调整。欣赏任何见解。
[10:46:52.974] Remote server is listening on 17332
[10:46:52.974] Parsed server configuration: {"remoteListeningOn":{"port":17332},"osReleaseId":"Linux","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","tmpDir":"/run/user/65612","platform":"linux"}
[10:46:52.976] Persisting server connection details to /Users/User/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-MY-SERVER-e5a624b788d92b8d34d1392e4c4d9789406efe8f-0.56.0/data.json
[10:46:52.978] Starting forwarding server. localPort 62979 -> socksPort 62958 -> remotePort 17332
[10:46:52.979] Forwarding server listening on 62979
[10:46:52.979] Waiting for ssh tunnel to be ready
[10:46:52.980] Tunneled 17332 to local port 62979
[10:46:52.980] Resolved "ssh-remote+7b22686f73744e616d65223a225143492d536f75726365227d" to "127.0.0.1:62979"
[10:46:52.981] [Forwarding server 62979] Got connection 0
[10:46:52.996] ------
[10:46:53.034] [Forwarding server 62979] Got connection 1
[10:46:53.035] [Forwarding server 62979] Got connection 2
[10:46:53.055] Failed to set up socket for dynamic port forward to remote port 17332: Socket closed. Is the remote port correct?
[10:46:53.104] Failed to set up socket for dynamic port forward to remote port 17332: Socket closed. Is the remote port correct?
[10:46:53.104] Failed to set up socket for dynamic port forward to remote port 17332: Socket closed. Is the remote port correct?
Run Code Online (Sandbox Code Playgroud)
小智 17
编辑 /etc/ssh/sshd_config
vi /etc/ssh/sshd_config
Run Code Online (Sandbox Code Playgroud)
更改 AllowTcpForwarding为是
AllowTcpForwarding = yes
Run Code Online (Sandbox Code Playgroud)
重新启动sshd
systemctl restart sshd
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6593 次 |
| 最近记录: |