Night
Night

Reputation: 73

VSCode Remote-SSH can not disable tcp port forward?

The sshd_config on my server is:

AllowTcpForwarding no
AllowAgentForwarding no

And because it's a public server of my company, I can't change any settings.

So I disabled my own settings like:

enter image description here

In settings.json:

"remote.SSH.enableDynamicForwarding": false,
    "remote.SSH.enableAgentForwarding": false,
    "remote.SSH.defaultForwardedPorts": [
    
    ],
    "remote.SSH.enableX11Forwarding": false,
    "remote.autoForwardPorts": false,
    "remote.forwardOnOpen": false,

But my question is, when I try to connect to the server by vscode remote-ssh, I still got the error:

enter image description here

I really don't understand why the port forwarding is not disabled.

Hope someone could help me solve this problem !!!

Upvotes: 1

Views: 915

Answers (1)

Martin Richtarsky
Martin Richtarsky

Reputation: 679

My expectation also was that disabling these settings would disable port forwarding. But according to this issue that's not the case. The forwarding is needed for setting up a port for the communication between local and remote.

There does not seem to be a plan to change this. You can use "Remote - Tunnels" as a workaround (recommended in the last comment).

Upvotes: 2

Related Questions