{"id":20444951,"url":"https://github.com/timo-reymann/ssh-knock-interceptor","last_synced_at":"2025-05-08T19:36:23.099Z","repository":{"id":59600609,"uuid":"429877335","full_name":"timo-reymann/ssh-knock-interceptor","owner":"timo-reymann","description":"Make jumphosts and knock easier without messing up your ssh config","archived":false,"fork":false,"pushed_at":"2024-04-01T17:30:27.000Z","size":83,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-01T16:50:13.532Z","etag":null,"topics":["bash","knock","ssh"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timo-reymann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2021-11-19T17:12:10.000Z","updated_at":"2023-03-21T19:09:18.000Z","dependencies_parsed_at":"2024-04-01T18:50:52.470Z","dependency_job_id":null,"html_url":"https://github.com/timo-reymann/ssh-knock-interceptor","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timo-reymann%2Fssh-knock-interceptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timo-reymann%2Fssh-knock-interceptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timo-reymann%2Fssh-knock-interceptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timo-reymann%2Fssh-knock-interceptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timo-reymann","download_url":"https://codeload.github.com/timo-reymann/ssh-knock-interceptor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224763040,"owners_count":17365657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bash","knock","ssh"],"created_at":"2024-11-15T10:10:15.667Z","updated_at":"2024-11-15T10:10:16.377Z","avatar_url":"https://github.com/timo-reymann.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"ssh-knock-interceptor\n===\n[![LICENSE](https://img.shields.io/github/license/timo-reymann/ssh-knock-interceptor)](https://github.com/timo-reymann/ssh-knock-interceptor/blob/main/LICENSE)\n[![Renovate](https://img.shields.io/badge/renovate-enabled-green?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNjkgMzY5Ij48Y2lyY2xlIGN4PSIxODkuOSIgY3k9IjE5MC4yIiByPSIxODQuNSIgZmlsbD0iI2ZmZTQyZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTUgLTYpIi8+PHBhdGggZmlsbD0iIzhiYjViNSIgZD0iTTI1MSAyNTZsLTM4LTM4YTE3IDE3IDAgMDEwLTI0bDU2LTU2YzItMiAyLTYgMC03bC0yMC0yMWE1IDUgMCAwMC03IDBsLTEzIDEyLTktOCAxMy0xM2ExNyAxNyAwIDAxMjQgMGwyMSAyMWM3IDcgNyAxNyAwIDI0bC01NiA1N2E1IDUgMCAwMDAgN2wzOCAzOHoiLz48cGF0aCBmaWxsPSIjZDk1NjEyIiBkPSJNMzAwIDI4OGwtOCA4Yy00IDQtMTEgNC0xNiAwbC00Ni00NmMtNS01LTUtMTI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IzEzYWNiZCIgZD0iTTEzNCAyNDhjLTQgMC04LTItMTEtNWwtMjMtMjNhMTYgMTYgMCAwMTAtMjNMMjAxIDk2YTE2IDE2IDAgMDEyMiAwbDI0IDI0YzYgNiA2IDE2IDAgMjJMMTQ2IDI0M2MtMyAzLTcgNS0xMiA1em03OC0xNDdsLTQgMi0xMDEgMTAxYTYgNiAwIDAwMCA5bDIzIDIzYTYgNiAwIDAwOSAwbDEwMS0xMDFhNiA2IDAgMDAwLTlsLTI0LTIzLTQtMnoiLz48cGF0aCBmaWxsPSIjYmY0NDA0IiBkPSJNMjg0IDMwNGMtNCAwLTgtMS0xMS00bC00Ny00N2MtNi02LTYtMTYgMC0yMmw4LThjNi02IDE2LTYgMjIgMGw0NyA0NmM2IDcgNiAxNyAwIDIzbC04IDhjLTMgMy03IDQtMTEgNHptLTM5LTc2Yy0xIDAtMyAwLTQgMmwtOCA3Yy0yIDMtMiA3IDAgOWw0NyA0N2E2IDYgMCAwMDkgMGw3LThjMy0yIDMtNiAwLTlsLTQ2LTQ2Yy0yLTItMy0yLTUtMnoiLz48L3N2Zz4=)](https://renovatebot.com)\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg width=\"300\" src=\"./.github/images/logo.png\"\u003e\n    \u003cbr /\u003e\n    Make jumphosts and knock easier without messing up your ssh config.\n\u003c/p\u003e\n\n## Features\n- Consolidate ssh knock config into dedicated config file\n- No dependency on knockd\n\n## Requirements\n- [Python 3.6+](https://python.org)\n- [bash](https://www.gnu.org/software/bash/)\n\n## Installation\n1. Clone the repo in your home folder:\n   `git clone https://github.com/timo-reymann/ssh-knock-interceptor.git $HOME/.ssh-knock-interceptor`\n\n## Usage\n1. Add to your ssh config:\n    ```ssh-config\n   Host *.example.com\n       ProxyCommand bash -c 'source $HOME/.ssh-knock-interceptor/init %h %p'\n    ```\n2. Create the config file for the knock hosts in `.ssh/knock-config`:\n   ```ini\n   [app*.example.com]\n   sequence = 1000 2000 3000\n   host     = jumphost-apps.example.com\n\n   [web*.example.com]\n   sequence = 1001 2001 3001\n   host     = jumphost-webservers.example.com\n\n   [advanced*.example.com]\n   use_udp  = true\n   sequence = 1001 2001:tcp 3001\n   host     = jumphost-webservers.example.com\n   ```\n\n## Motivation\nMaintaining knock commands in your ssh config becomes a huge mess over time.\n\n## Documentation\n### How it works\nIt consists of three parts:\n\n- Python script\n   - parse and validate ini file\n   - knock with python\n- Bash wrapper\n    - to source env vars\n    - execute ssh command in same tty\n- Integration into existing ssh config\n\n## Contributing\nI love your input! I want to make contributing to this project as easy and transparent as possible, whether it's:\n\n- Reporting a bug\n- Discussing the current state of the configuration\n- Submitting a fix\n- Proposing new features\n- Becoming a maintainer\n\nTo get started please read the [Contribution Guidelines](./CONTRIBUTING.md).\n\n## Development\n- [Python 3](https://python.org)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimo-reymann%2Fssh-knock-interceptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimo-reymann%2Fssh-knock-interceptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimo-reymann%2Fssh-knock-interceptor/lists"}