如何使用其他端口与远程SSH VS Code扩展连接 [英] How do I use other port to connect with Remote SSH VS Code extention

查看:459
本文介绍了如何使用其他端口与远程SSH VS Code扩展连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现 Visual Studio代码远程开发扩展包.我想尝试一下,但是我的遥控器在2222端口上.

I discover Visual Studio Code Remote Development Extension Pack. I wanted to try it, but my remote is on a 2222 port.

我可以使用ssh命令正确连接Linux笔记本电脑上的Putty和端口2222.

I can correctly connect with Putty and my port 2222, same on my Linux laptop with ssh command.

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

What is the correct config to use Code Remote via SSH with other port ?

谢谢

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

推荐答案

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

Just add Port to your config like:

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

这篇关于如何使用其他端口与远程SSH VS Code扩展连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆