How to connect VSCode remote development to a Fly machine?

Hi… I may be misunderstanding what you attempted, but Fly.io’s built-in SSH server (hallpass) is intentionally rather minimal and doesn’t support port forwarding (at least not last I heard).

What you can do instead is use @rubys’s trick of installing OpenSSH’s server in parallel with the built-in one:

https://fly.io/docs/blueprints/opensshd/

Then you can just ask VSCode to contact port 2222 instead of port 22.

Hope this helps!

1 Like