{"id":26458465,"url":"https://github.com/cronn-de/ssh-proxy","last_synced_at":"2025-03-19T00:01:53.059Z","repository":{"id":42002172,"uuid":"62811590","full_name":"cronn/ssh-proxy","owner":"cronn","description":"Pure Java implementation for SSH port tunneling that understands ProxyJump and ProxyCommand","archived":false,"fork":false,"pushed_at":"2024-07-12T07:32:27.000Z","size":677,"stargazers_count":34,"open_issues_count":1,"forks_count":16,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-07-30T05:18:17.182Z","etag":null,"topics":["java","ssh","tunnel"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cronn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2016-07-07T14:07:06.000Z","updated_at":"2024-07-30T05:18:20.757Z","dependencies_parsed_at":"2024-01-07T22:48:35.505Z","dependency_job_id":"9dd5167b-4473-4e8e-819b-e5b4799b0e4a","html_url":"https://github.com/cronn/ssh-proxy","commit_stats":null,"previous_names":["cronn-de/ssh-proxy"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cronn%2Fssh-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cronn%2Fssh-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cronn%2Fssh-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cronn%2Fssh-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cronn","download_url":"https://codeload.github.com/cronn/ssh-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244326199,"owners_count":20435122,"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":["java","ssh","tunnel"],"created_at":"2025-03-19T00:01:45.282Z","updated_at":"2025-03-19T00:01:53.050Z","avatar_url":"https://github.com/cronn.png","language":"Java","funding_links":[],"categories":["\u003ca id=\"01e6651181d405ecdcd92a452989e7e0\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"ea4dfcd8f33ec1852180c6283b2c8516\"\u003e\u003c/a\u003e未分类"],"readme":"[![CI](https://github.com/cronn/ssh-proxy/workflows/CI/badge.svg)](https://github.com/cronn/ssh-proxy/actions)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/de.cronn/ssh-proxy/badge.svg)](http://maven-badges.herokuapp.com/maven-central/de.cronn/ssh-proxy)\n[![Apache 2.0](https://img.shields.io/github/license/cronn/ssh-proxy.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n[![codecov](https://codecov.io/gh/cronn/ssh-proxy/branch/main/graph/badge.svg?token=qhZPq2vKnv)](https://codecov.io/gh/cronn/ssh-proxy)\n[![Valid Gradle Wrapper](https://github.com/cronn/ssh-proxy/workflows/Validate%20Gradle%20Wrapper/badge.svg)](https://github.com/cronn/ssh-proxy/actions/workflows/gradle-wrapper-validation.yml)\n\n# SSH Proxy #\n\nA pure Java implementation for SSH port tunneling that is able to understand\nOpenSSH configurations which involve multiple hops to reach a target host.\nThis library essentially combines [JSch][jsch] with the ability to understand\n`ProxyJump` or `ProxyCommand` configurations in your local `~/.ssh/config`\nfile.\n\nSee our [blog post \"Tunneling Basics – Part II: OpenSSH Configuration Files\"][blog-post-ssh-configuration-files] for\nsome context where and how this library can be used.\n\n## Usage ##\nAdd the following Maven dependency to your project:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ede.cronn\u003c/groupId\u003e\n    \u003cartifactId\u003essh-proxy\u003c/artifactId\u003e\n    \u003cversion\u003e1.6\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Example ###\n\n```\n# cat ~/.ssh/config\n\nHost jumpHost1\n    User my-user\n    HostName jumphost1.my.domain\n\nHost jumpHost2\n    User other-user\n    ProxyJump jumpHost1\n\nHost targetHost\n    ProxyCommand ssh -q -W %h:%p jumpHost2\n```\n\n```java\ntry (SshProxy sshProxy = new SshProxy()) {\n    int targetPort = 1234;\n    int randomLocalPort = sshProxy.connect(\"jumpHost2\", \"targetHost\", targetPort);\n    try (Socket s = new Socket(SshProxy.LOCALHOST, randomLocalPort)) {\n        OutputStream out = s.getOutputStream();\n        InputStream in = s.getInputStream();\n        // ...\n    }\n}\n```\n\n## Dependencies ##\n\n- Java 11+\n- [JSch (with JZlib)][jsch]\n\n[jsch]: http://www.jcraft.com/jsch/\n[blog-post-ssh-configuration-files]: https://blog.cronn.de/en/ssh/configuration/2021/08/16/ssh-configuration.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcronn-de%2Fssh-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcronn-de%2Fssh-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcronn-de%2Fssh-proxy/lists"}