我正在尝试使用Remote-SSH扩展来编辑Debian服务器上的文件。SSH连接已正确建立,但随后我收到错误消息:
Failed to connect to the remote extension host server和日志:
[13:19:04.182] Remote server is listening on port 51569
[13:19:04.182] Parsed server configuration: {"agentPort":51569,"osReleaseId":"debian","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","tmpDir":"/tmp"}
[13:19:04.184] Starting forwarding server. localPort 59828 -> socksPort 59825 -> remotePort 51569
[13:19:04.185] Forwarding server listening on 59828
[13:19:04.185] Waiting for ssh tunnel to be ready
[13:19:04.186] Tunneled remote port 51569 to local port 59828
[13:19:04.186] Resolved "ssh-remote+home-debian.web-data.host" to "127.0.0.1:59828"
[13:19:04.187] [Forwarding server 59828] Got connection 0
[13:19:04.195] ------
[13:19:04.208] [Forwarding server 59828] Got connection 1
[13:19:04.208] [Forwarding server 59828] Got connection 2
[13:19:04.217] Failed to set up socket for dynamic port forward to remote port 51569: Socket closed. Is the remote port correct?
[13:19:04.227] > channel 3: open failed: administratively prohibited: open failed
[13:19:04.235] Failed to set up socket for dynamic port forward to remote port 51569: Socket closed. Is the remote port correct?
[13:19:04.237] Failed to set up socket for dynamic port forward to remote port 51569: Socket closed. Is the remote port correct?
[13:19:04.241] > channel 4: open failed: administratively prohibited: open failed
> channel 5: open failed: administratively prohibited: open failed我正在其他几个服务器上使用远程ssh连接,并且从来没有出现过这个错误。我已经测试了从网络上收集到的一些东西,但到目前为止都没有起作用。
有人能告诉我这个问题的原因或可能的解决方案吗?谢谢!
发布于 2020-05-21 14:23:45
Delete '~/.vscode-server' folder on your server, and try reconnect.不确定是否适用于Debian服务器,但这在Ubuntu 18.04上有效
发布于 2020-07-23 18:51:07
在sshd_config中将AllowTcpForwarding从no更改为yes,然后重新启动sshd。
在Raspbian GNU/Linux 10 (buster)上测试
发布于 2021-08-17 10:22:39
请按照以下步骤操作
sshd_config文件,然后将主机上的ssh设置为yesrm -rf /home/<user_name>/.vscode-server.vscode-server。希望它能工作https://stackoverflow.com/questions/60507713
复制相似问题