Search code examples
herokussh-tunneldyno

How to SSH tunnel through Heroku dyno?


How do I create an SSH tunnel to a Heroku dyno?


Solution

  • Assuming you want to create an SSH tunnel in order to proxy, you can create a SOCKS proxy as follows. Assuming you have a local Heroku project, in that directory:

    heroku ps:socks will create a SOCKS proxy on a localhost port. You can then proxy through your dyno by e.g. socks5://localhost:1080.

    Hope that helps!