VSCode远程SSH连接失败 [英] VSCode Remote SSH Connection Failed
本文介绍了VSCode远程SSH连接失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用远程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连接,从来没有出现过这个错误。我已经测试了从网络上收集到的一些东西,但到目前为止都没有奏效。
有人能告诉我这个问题的原因或可能的解决方案吗?谢谢!推荐答案
将sshd_CONFIG中的AllowTcpForwarding
从no
更改为yes
,然后重新启动sshd
对我有效。
测试日期:Raspbian GNU/Linux 10 (buster)
这篇关于VSCode远程SSH连接失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文