{"id":16188708,"url":"https://github.com/yurenchen000/ssh-keep","last_synced_at":"2026-02-12T21:01:25.819Z","repository":{"id":65087938,"uuid":"581488874","full_name":"yurenchen000/ssh-keep","owner":"yurenchen000","description":"keep your ssh connection survive from network fluctuation or wifi switching","archived":false,"fork":false,"pushed_at":"2025-08-20T23:38:16.000Z","size":32,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-21T00:28:23.586Z","etag":null,"topics":["keepalive","openssh","persistent","roaming","ssh","ssh-connection","ssh-relay","ssh-roaming","ssh-session","tunnel"],"latest_commit_sha":null,"homepage":"","language":"Go","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/yurenchen000.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,"zenodo":null}},"created_at":"2022-12-23T10:37:22.000Z","updated_at":"2025-08-20T23:38:19.000Z","dependencies_parsed_at":"2023-11-28T19:45:24.883Z","dependency_job_id":"8a8b3faf-3b73-4f8c-9135-f8711d8a1cb1","html_url":"https://github.com/yurenchen000/ssh-keep","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/yurenchen000/ssh-keep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurenchen000%2Fssh-keep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurenchen000%2Fssh-keep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurenchen000%2Fssh-keep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurenchen000%2Fssh-keep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yurenchen000","download_url":"https://codeload.github.com/yurenchen000/ssh-keep/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurenchen000%2Fssh-keep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29381021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T20:34:40.886Z","status":"ssl_error","status_checked_at":"2026-02-12T20:23:00.490Z","response_time":55,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["keepalive","openssh","persistent","roaming","ssh","ssh-connection","ssh-relay","ssh-roaming","ssh-session","tunnel"],"created_at":"2024-10-10T07:30:19.985Z","updated_at":"2026-02-12T21:01:25.781Z","avatar_url":"https://github.com/yurenchen000.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"ssh-keep\n========\n\n[![build](https://github.com/yurenchen000/ssh-keep/actions/workflows/release.yml/badge.svg)](https://github.com/yurenchen000/ssh-keep/releases)\n[![go-report](https://goreportcard.com/badge/github.com/yurenchen000/ssh-keep)](https://goreportcard.com/report/github.com/yurenchen000/ssh-keep)\n\n[![release](https://img.shields.io/github/v/release/yurenchen000/ssh-keep)](https://github.com/yurenchen000/ssh-keep/releases)\n\n\u003cbr\u003e\n\n## 🧐 what's this\n\nkeep your ssh connection survive from network fluctuation or wifi switching\n\nInspired by\nhttps://eternalterminal.dev\n\n\nIt work as a relay-connection between ssh-client and ssh-server.\n\n\n```\n                                        [ssh server]\n                                             |\n                                            tcp\n                                             |\nrelay-client ---- relay-connection ---- relay-server\n    |\n  stdio\n    |\n[ssh client]\n```\n\nthe relay-client \u0026 relay-server fake a persistent connection,  \nquietly reconnect and never noitfy ssh-client/ssh-server.\n\n\u003cbr\u003e\n\n## 🛠️ build\n// you don't have to build it, pre-build binary can be download at release page.\n```console\nGO111MODULE=off GOPATH=$PWD go build -o ssh-keep-c client.go\nGO111MODULE=off GOPATH=$PWD go build -o ssh-keep-s server.go\n```\n\nthen got\n- ssh-keep-c //the client side, ssh proxy cmd\n- ssh-keep-s //the server side, ssh relay\n\n\u003cbr\u003e\n\n## 🚀 deploy\n\n\n### 1. server side\n\nconnect to your real ssh server :22.\nand listen on a tcp port (:2021 for example, wait for client connect)\n\nRun manually\n```console\n./ssh-keep-s -server 127.0.0.1:22 -listen :2021\n```\n\nOR Use systemd service:\n```bash\n#install\nsudo cp -pvi ssh-keep-s       /usr/local/bin/\nsudo cp -pvi ssh-keep.service /etc/systemd/system/\nsudo systemctl daemon-reload\n\n#start\nsudo systemctl start ssh-keep.service\n\n#auto start\nsudo systemctl enable ssh-keep.service\n```\n\n\u003cbr\u003e\n\n**sshd_config**  \n// or put it into `/etc/ssh/sshd_config.d/ssh_keep.conf`\n```sshdconfig\n############# local conn for ssh-keep\nMatch Address 127.0.0.1,::1\n    # max 20 day timeout\n    ClientAliveInterval 3600\n    ClientAliveCountMax 480\n```\n\n// reload sshd_config  \n`sudo systemctl reload ssh`\n\n\u003cbr\u003e\n\n### 2. client side\n\n```console\nssh -o ProxyCommand='ssh-keep-c --server %h:2021 2\u003e/dev/null' your_ssh_server\n```\n\nor put it into **ssh_config**\n\n```sshconfig\n## setup a ssh-keep client\nHost your_ssh_server\n    ProxyCommand ssh-keep-c --server %h:2021 2\u003e/dev/null\n\n    ## not send alive msg (Useful when PC suspend/hibernate/offline hours)\n    ServerAliveInterval 0\n    TCPKeepAlive no\n\n    ## or long timeout:  (max 20 day timeout)\n    #ClientAliveInterval 3600\n    #ClientAliveCountMax 480\n```\n\n// then it can also work as a jump host (get the benefit of stable connection)\n```sshconfig\n## other can use it as a jump host\nHost other_ssh_server\n    ProxyJump your_ssh_server\n```\n\n\u003cbr\u003e\n\n## 💡 tips\nwhen lose connect with server, you can't exit by `Ctrl+D`  \n// that's bash exit key, but you lose connection with it.\n\nuse \n- `Enter ~ . ` to exit \n- `Enter ~ ? ` for help\n\n// that's ssh special key.\n\n\n\u003cbr\u003e\n\n## 🧰 Related Tools\n\n[![related-repos](https://res.ez2.fun/svg/repos-ssh_enhance.svg)](https://github.com/yurenchen000/yurenchen000/blob/main/repos.md#ssh-enhance)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurenchen000%2Fssh-keep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyurenchen000%2Fssh-keep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurenchen000%2Fssh-keep/lists"}