I'm working on code on my server which is within my corporate network firewall. The way I do this is as follows: I ssh to my home gateway myhomegateway with user user1 and port 11111 which has a permanent reverse tunnel with my workstation workstation with user user2 on port 22222. Then through the workstation I can ssh to the server servername with user user3 and port 33333.
I can access my server using this single command where I need to enter 3 different passwords one after the other:
ssh -A -t myhomegateway -l user1 -p 11111 ssh -A -t localhost -l user2 -p 22222 ssh -A servername -l user3 -p 33333
However instead of working with vim or nano, I'd like to work with VSCode using the Remote SSH extension.
I have seen similar posts e.g. VSCode SSH with multiple hops and https://stackoverflow.com/questions/57780250/does-vscode-remote-support-double-ssh that configured the .ssh\config file by adding ProxyJump but for some reason it doesn't work for my case where I have non-standard SSH ports and different usernames. My file currently is as follows. Can anyone help with this? (My VSCode OS is Windows)
host myhomegateway
HostName myhomegateway.IP
User user1
Port 11111
ProxyJump reversetunnel
host reversetunnel
HostName localhost
User user2
Port 22222
ProxyJump server
host server
HostName servername
User user3
Port 33333