4

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

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

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

Thanks

Host my-remote-connection
    HostName mydomain.name
    User myusername
jww
  • 97,681
  • 90
  • 411
  • 885
MushuLeDragon
  • 87
  • 2
  • 12

1 Answers1

7

Just add Port to your config like:

Host my-remote-connection
    HostName mydomain.name
    User myusername
    Port 2222
HaaLeo
  • 10,065
  • 3
  • 44
  • 55
  • Thanks for your answer. I will try this. – MushuLeDragon Jun 14 '19 at 10:40
  • One issue with that if you try and ssh from the command line it won't connect to ssh listening on port 22 and means ones can't ssh in from the terminal. Any other option on how to set this up? – Mick T Sep 09 '22 at 18:35