如何使用其他端口连接远程 SSH VSCode 扩展

How do I use other port to connect with Remote SSH VS Code extention

我发现了Visual Studio Code Remote Development Extension Pack。我想试试,但我的遥控器在 2222 端口上。

我可以正确连接 Putty 和我的端口 2222,在我的 Linux 笔记本电脑上使用 ssh 命令也是如此。

通过 SSH 和其他端口使用 Code Remote 的正确配置是什么?

谢谢

Host my-remote-connection
    HostName mydomain.name
    User myusername

只需将 Port 添加到您的配置中,例如:

Host my-remote-connection
    HostName mydomain.name
    User myusername
    Port 2222