0

Thanks for taking a look at my question.

I've been writing code from my desk to a remote server managed by WHM/cPanel (for which I have full root access) with VS Code Remote SSH functionality for a few months without any major connectivity trouble. All of a sudden (as in: since yesterday) VS Code can't display the contents of folders on the server for apparently any cPanel account while it can successfully establish an SSH session (I can also do it from PuTTY or a terminal). I can have the same VS Code installation connecting to another Ubuntu server and list contents, edit files remotely and all that.

Reading in several places on the net, when this happens is a result of SSH having the flag AllowTcpForwarding set to off, I checked /etc/ssh/sshd_config and since it was not specified I set it to on explicitly. Several additional things have been attempted: restarting SSHD, gracefully rebooting the server, modifying sshd_config back and forth, disabling cPHulk, deleting the vs code server folder to let it reinstall automatically and some other things I don't recall at the moment. File /var/log/secure with sshd log level at DEBUG3 is showing a single error message that doesn't provide many leads:

sshd[5463]: debug1: channel 1: connection failed: Connection refused
sshd[5463]: error: connect_to 127.0.0.1 port 38185: failed.

Something is clearly blocking the connection to the forwarded ports at the server, causing the refusal to connect, but I can't seem to find what, even less why or how. Very grateful for any pointers and leads to find the culprit and regaining the possibility to connect through the port forwarding functionality.

1 Answer 1

0

After a few days and an update to VS Code (to version 1.76.1 and date 2023-03-08T16:32:00.131Z as of this moment - a 1 day old release) I could connect back to the server and edit my code projects directly.

The root cause is undetermined on my end, but I am running this instance on a Virtuozzo VPS, so that this fix on the release notes of the latest version is likely to be the culprit.

For completion, the github issue report is titled vscode-server crashes, if there is no network interface with a valid mac address present, which would cause a failed connection on a port forward, since there was no entity listening on the forwarded port and thus the communication was broken.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .