Failed to set up socket for dynamic port forward to remote port 40413: Socket closed. Is the remote port correct?
Follow these steps
- Update the sshd_config file in the host machine. Follow this command:
nano /etc/ssh/sshd_config
and then setAllowTcpForwarding to yes
- Restart ssh on the host machine
sudo systemctl restart ssh
- Delete the
.vscode-server
in host machinerm -rf /home/<user_name>/.vscode-server
Now connect through VS Code again. Hopefully it will work