{"id":19393966,"url":"https://github.com/ruanbekker/ssh-reverse-tunnel","last_synced_at":"2026-06-12T18:33:34.680Z","repository":{"id":139707068,"uuid":"270839806","full_name":"ruanbekker/ssh-reverse-tunnel","owner":"ruanbekker","description":"Tool to Reach Servers with No Public Route","archived":false,"fork":false,"pushed_at":"2020-06-15T22:09:41.000Z","size":3,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-31T06:33:41.223Z","etag":null,"topics":["networking","raspberry-pi","reverse-tunnel","ssh","ssh-tunnel","tunnel"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruanbekker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-08T21:59:20.000Z","updated_at":"2020-06-26T00:00:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"08e0cf74-5647-49f3-8a8f-8a9edc437a97","html_url":"https://github.com/ruanbekker/ssh-reverse-tunnel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ruanbekker/ssh-reverse-tunnel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruanbekker%2Fssh-reverse-tunnel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruanbekker%2Fssh-reverse-tunnel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruanbekker%2Fssh-reverse-tunnel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruanbekker%2Fssh-reverse-tunnel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruanbekker","download_url":"https://codeload.github.com/ruanbekker/ssh-reverse-tunnel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruanbekker%2Fssh-reverse-tunnel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34258368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["networking","raspberry-pi","reverse-tunnel","ssh","ssh-tunnel","tunnel"],"created_at":"2024-11-10T10:32:45.343Z","updated_at":"2026-06-12T18:33:34.665Z","avatar_url":"https://github.com/ruanbekker.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ssh-reverse-tunnel\n\nPersonal utility that I use to reach my Raspberry Pi Nodes that has no direct route via the Internet\n\n## Other Projects\n\nThere's a lot of other tools out there that's already solving this issue, such as [inlets](https://inlets.dev), but I wanted my own, so that I can extend features to it as it pleases me.\n\n## Overview\n\nThis is more ore less how it looks like:\n\n```\n[VPS] \u003c-- Has a Public IP\n |\n |\n [HOME NETWORK] \u003c-- Dynamic IP\n   |\n   |\n [rpi-01:22], [rpi-02:22] \u003c-- Private IPs\n```\n\n- SSH Tunnel is setup from the Raspberry Pi Nodes\n- Each Raspberry Pi sets up a unique port on the VPS for the tunnel to traverse to the Rpi on port 22\n- To reach Rpi-01, you hop onto the VPS and ssh to localhost port 2201\n- To reach Rpi-02, you hop onto the VPS and ssh to localhost port 2202, etc\n\n## Progress\n\nThe tool will still be built, but using ssh it's quite easy\n\n## Usage\n\nSetup the SSH Reverse Tunnel from rpi-01:\n\n```\n$ ssh -i ~/.ssh/bastion.pem \\\n  -o StrictHostKeyChecking=no \\\n  -o UserKnownHostsFile=/dev/null \\\n  -o ServerAliveInterval=60 \\\n  -N -R 2201:localhost:22 \\\n  -p 22 ruan@bastion-9239.domain.cloud\n```\n\nSetup the SSH Reverse Tunnel from rpi-02:\n\n```\n$ ssh -i ~/.ssh/bastion.pem \\\n  -o StrictHostKeyChecking=no \\\n  -o UserKnownHostsFile=/dev/null \\\n  -o ServerAliveInterval=60 \\\n  -N -R 2202:localhost:22 \\\n  -p 22 ruan@bastion-9239.domain.cloud\n```\n\nOn the VPS, we can see that we have port 2021 and 2022 listening:\n\n```\n$ netstat -tulpn\nActive Internet connections (only servers)\nProto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name\ntcp        0      0 127.0.0.1:2201          0.0.0.0:*               LISTEN      -\ntcp        0      0 127.0.0.1:2202          0.0.0.0:*               LISTEN      -\n```\n\nTo connect to rpi-01, we ssh to localhost on port 2201, from the VPS:\n\n```\n$ ssh -p 2201 pi@localhost\npi@rpi-01:~ $\n```\n\nTo connect to rpi-02, we ssh to localhost on port 2202 from the VPS:\n\n```\n$ ssh -p 2202 pi@localhost\npi@rpi-02:~ $\n```\n\n## Other Use-Cases\n\n- [Remote MySQL with SSH Tunnel](https://github.com/ruanbekker/ssh-reverse-tunnel/wiki/Remote-MySQL-With-SSH-Tunnel)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruanbekker%2Fssh-reverse-tunnel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruanbekker%2Fssh-reverse-tunnel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruanbekker%2Fssh-reverse-tunnel/lists"}