{"id":21530799,"url":"https://github.com/bk138/libsshtunnel","last_synced_at":"2025-04-28T15:22:32.743Z","repository":{"id":207899747,"uuid":"718186595","full_name":"bk138/libsshtunnel","owner":"bk138","description":"Simple SSH tunnel library to let your networking app connect to a host running behind a SSH server.","archived":false,"fork":false,"pushed_at":"2024-01-07T11:12:51.000Z","size":89,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-28T15:22:30.701Z","etag":null,"topics":["library","ssh","ssh-tunnel","tunnel"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bk138.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"COPYING","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},"funding":{"liberapay":"bk138","patreon":"bk138"}},"created_at":"2023-11-13T15:04:32.000Z","updated_at":"2025-04-27T18:40:45.000Z","dependencies_parsed_at":"2023-11-23T22:21:09.469Z","dependency_job_id":"ce460970-fc22-474a-9c70-fbf3e840ac26","html_url":"https://github.com/bk138/libsshtunnel","commit_stats":null,"previous_names":["bk138/libsshtunnel"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bk138%2Flibsshtunnel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bk138%2Flibsshtunnel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bk138%2Flibsshtunnel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bk138%2Flibsshtunnel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bk138","download_url":"https://codeload.github.com/bk138/libsshtunnel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251336497,"owners_count":21573211,"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":["library","ssh","ssh-tunnel","tunnel"],"created_at":"2024-11-24T02:10:18.605Z","updated_at":"2025-04-28T15:22:32.720Z","avatar_url":"https://github.com/bk138.png","language":"C","funding_links":["https://liberapay.com/bk138","https://patreon.com/bk138"],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/bk138/libsshtunnel/actions/workflows/ci.yml/badge.svg)](https://github.com/bk138/libsshtunnel/actions/workflows/ci.yml)\n\n# About\n\nlibsshtunnel is a simple SSH tunnel library to let your networking app connect to a host running behind a SSH server.\n\n# Example Usage\n\n```C\n#include \u003clibsshtunnel.h\u003e\n\n// Callback that handles the SSH server's fingerprint.\n// For the example, accepts any fingerprint, but normally\n// you would check against saved ones etc.\nint ssh_fingerprint_check(void *client,\n                          const char *fingerprint,\n                          int fingerprint_len,\n                          const char *host) {\n    return 0;\n}\n\n// No extended error checking here for the sake of API showoff.\nint main () {\n    // Init crypto backend, has to be called only once.\n    ssh_tunnel_init();\n\n    // Open a tunnel. This one uses password auth, there also is a variant using the private key.\n    ssh_tunnel_t *t = ssh_tunnel_open_with_password(\"ssh.server.net\",       // Hostname of SSH server\n                                                    \"username\",             // SSH user name\n                                                    \"password\",             // SSH user's password\n                                                    \"localhost\",            // Remote service is running directly on SSH server\n                                                     26000,                 // Port of remote service\n                                                     NULL,                  // You can give an application pointer here that's handed to the callbacks.\n                                                     ssh_fingerprint_check, // SSH fingerprint check callback\n                                                     NULL);                 // Callback for error reporting, can be omitted\n    if(t) {\n        // Initial tunnel creation succeeded; you can now let your code connect\n        // to the local end of the tunnel:\n        // Your client will get connected to the server running on\n        // \"ssh.server.net\", port 26000, as specified above.\n        my_client_connect(\"localhost\", ssh_tunnel_get_port(t));\n\n       // Your other logic here...\n    }\n\n    // Closes the tunnel and frees memory.\n    ssh_tunnel_close(t);\n\n    return 0;\n}\n```\n\n# Building\n\nlibsshtunnel uses CMake, thus it's:\n\n    mkdir build\n    cd build\n    cmake ..\n    cmake --build .\n\n# License\n\nlibsshtunnel is licensed under the BSD 3-Clause License.\nSee [COPYING](COPYING) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbk138%2Flibsshtunnel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbk138%2Flibsshtunnel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbk138%2Flibsshtunnel/lists"}