{"id":20915161,"url":"https://github.com/trzsz/tsshd","last_synced_at":"2026-06-07T05:01:07.223Z","repository":{"id":243361500,"uuid":"812111989","full_name":"trzsz/tsshd","owner":"trzsz","description":"tsshd is a UDP-based SSH server built for unreliable networks. It supports seamless roaming across networks and IP changes, and works well on high-latency links such as cellular connections and unstable Wi-Fi.","archived":false,"fork":false,"pushed_at":"2026-05-31T09:42:39.000Z","size":348,"stargazers_count":482,"open_issues_count":2,"forks_count":20,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-05-31T11:14:41.265Z","etag":null,"topics":["lrzsz","mosh","rz","ssh","ssh-server","sz","trz","trzsz","tssh","tsshd","tsz"],"latest_commit_sha":null,"homepage":"https://trzsz.github.io/tsshd","language":"Go","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/trzsz.png","metadata":{"files":{"readme":"README.cn.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"trzsz"}},"created_at":"2024-06-08T01:55:24.000Z","updated_at":"2026-05-31T09:39:54.000Z","dependencies_parsed_at":"2024-08-18T09:48:42.963Z","dependency_job_id":"85af77dd-44de-4e9a-95b0-d01aedb6497f","html_url":"https://github.com/trzsz/tsshd","commit_stats":null,"previous_names":["trzsz/tsshd"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/trzsz/tsshd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trzsz%2Ftsshd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trzsz%2Ftsshd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trzsz%2Ftsshd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trzsz%2Ftsshd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trzsz","download_url":"https://codeload.github.com/trzsz/tsshd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trzsz%2Ftsshd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34009201,"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-07T02:00:07.652Z","response_time":124,"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":["lrzsz","mosh","rz","ssh","ssh-server","sz","trz","trzsz","tssh","tsshd","tsz"],"created_at":"2024-11-18T16:13:23.202Z","updated_at":"2026-06-07T05:01:07.102Z","avatar_url":"https://github.com/trzsz.png","language":"Go","funding_links":["https://github.com/sponsors/trzsz"],"categories":["\u003ca name=\"networking\"\u003e\u003c/a\u003eNetworking"],"sub_categories":[],"readme":"# tsshd\n\n[![MIT License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://choosealicense.com/licenses/mit/)\n[![GitHub Release](https://img.shields.io/github/v/release/trzsz/tsshd)](https://github.com/trzsz/tsshd/releases)\n\n`tsshd` 类似于 `mosh-server`，而 [`tssh --udp`](https://github.com/trzsz/trzsz-ssh) 类似于 [`mosh`](https://github.com/mobile-shell/mosh)。\n\n## 优点简介\n\n- 降低延迟（ 基于 [QUIC](https://github.com/quic-go/quic-go) / [KCP](https://github.com/xtaci/kcp-go) ）\n\n- 端口转发（ 与 openssh 相同，包括 ssh agent 转发和 X11 转发 ）\n\n- 连接迁移（ 支持网络切换和掉线重连 ）\n\n## 如何使用\n\n1. 在客户端（本地电脑）上安装 [tssh](https://github.com/trzsz/trzsz-ssh)。\n\n2. 在服务端（远程机器）上安装 [tsshd](https://github.com/trzsz/tsshd)。\n\n3. 使用 `tssh --udp` 登录服务器。如下配置可省略 `--udp` 参数：\n\n   ```\n   Host xxx\n       #!! UdpMode yes\n       #!! TsshdPath ~/go/bin/tsshd\n   ```\n\n## 原理简介\n\n- `tssh` 在客户端扮演 `ssh` 的角色，`tsshd` 在服务端扮演 `sshd` 的角色。\n\n- `tssh` 会先作为一个 ssh 客户端正常登录到服务器上，然后在服务器上启动一个新的 `tsshd` 进程。\n\n- `tsshd` 进程会随机侦听一个 61000 到 62000 之间的 UDP 端口，并将其端口和密钥通过 ssh 通道发回给 `tssh` 进程。登录的 ssh 连接会被关闭，然后 `tssh` 进程通过 UDP 与 `tsshd` 进程通讯。\n\n- `tsshd` 支持 `QUIC` 协议和 `KCP` 协议（默认是 `QUIC` 协议），可以命令行指定（如 `-oUdpMode=KCP`），或如下配置：\n\n  ```\n  Host xxx\n      #!! UdpMode KCP\n  ```\n\n## 安装方法\n\n- Ubuntu 可用 apt 安装\n\n  \u003cdetails\u003e\u003csummary\u003e\u003ccode\u003esudo apt install tsshd\u003c/code\u003e\u003c/summary\u003e\n\n  ```sh\n  sudo apt update \u0026\u0026 sudo apt install software-properties-common\n  sudo add-apt-repository ppa:trzsz/ppa \u0026\u0026 sudo apt update\n\n  sudo apt install tsshd\n  ```\n\n  \u003c/details\u003e\n\n- Debian 可用 apt 安装\n\n  \u003cdetails\u003e\u003csummary\u003e\u003ccode\u003esudo apt install tsshd\u003c/code\u003e\u003c/summary\u003e\n\n  ```sh\n  sudo apt install curl gpg\n  curl -s 'https://keyserver.ubuntu.com/pks/lookup?op=get\u0026search=0x7074ce75da7cc691c1ae1a7c7e51d1ad956055ca' \\\n    | gpg --dearmor -o /usr/share/keyrings/trzsz.gpg\n  echo 'deb [signed-by=/usr/share/keyrings/trzsz.gpg] https://ppa.launchpadcontent.net/trzsz/ppa/ubuntu jammy main' \\\n    | sudo tee /etc/apt/sources.list.d/trzsz.list\n  sudo apt update\n\n  sudo apt install tsshd\n  ```\n\n  \u003c/details\u003e\n\n- Linux 可用 yum 安装\n\n  \u003cdetails\u003e\u003csummary\u003e\u003ccode\u003esudo yum install tsshd\u003c/code\u003e\u003c/summary\u003e\n\n  - 国内推荐使用 [wlnmp](https://www.wlnmp.com/install) 源，安装 tsshd 只需要添加 wlnmp 源（ 配置 epel 源不是必须的 ）：\n\n    ```sh\n    curl -fsSL \"https://sh.wlnmp.com/wlnmp.sh\" | bash\n\n    sudo yum install tsshd\n    ```\n\n  - 也可使用 [gemfury](https://gemfury.com/) 源（ 只要网络通，所有操作系统通用 ）\n\n    ```sh\n    echo '[trzsz]\n    name=Trzsz Repo\n    baseurl=https://yum.fury.io/trzsz/\n    enabled=1\n    gpgcheck=0' | sudo tee /etc/yum.repos.d/trzsz.repo\n\n    sudo yum install tsshd\n    ```\n\n  \u003c/details\u003e\n\n- ArchLinux 可用 [yay](https://github.com/Jguer/yay) 安装\n\n  \u003cdetails\u003e\u003csummary\u003e\u003ccode\u003eyay -S tsshd\u003c/code\u003e\u003c/summary\u003e\n\n  ```sh\n  yay -Syu\n  yay -S tsshd\n  ```\n\n  \u003c/details\u003e\n\n- 用 Go 直接安装（ 要求 go 1.24 以上 ）\n\n  \u003cdetails\u003e\u003csummary\u003e\u003ccode\u003ego install github.com/trzsz/tsshd/cmd/tsshd@latest\u003c/code\u003e\u003c/summary\u003e\n\n  ```sh\n  go install github.com/trzsz/tsshd/cmd/tsshd@latest\n  ```\n\n  安装后，`tsshd` 程序一般位于 `~/go/bin/` 目录下（ Windows 一般在 `C:\\Users\\your_name\\go\\bin\\` ）。\n\n  \u003c/details\u003e\n\n- 用 Go 自己编译（ 要求 go 1.24 以上 ）\n\n  \u003cdetails\u003e\u003csummary\u003e\u003ccode\u003esudo make install\u003c/code\u003e\u003c/summary\u003e\n\n  ```sh\n  git clone --depth 1 https://github.com/trzsz/tsshd.git\n  cd tsshd\n  make\n  sudo make install\n  ```\n\n  \u003c/details\u003e\n\n- 可从 [GitHub Releases](https://github.com/trzsz/tsshd/releases) 中下载，国内可从 [Gitee 发行版](https://gitee.com/trzsz/tsshd/releases) 中下载，解压并加到 `PATH` 环境变量中。\n\n## 联系方式\n\n有什么问题可以发邮件给作者 \u003clonnywong@qq.com\u003e，也可以提 [Issues](https://github.com/trzsz/tsshd/issues) 。欢迎加入 QQ 群：318578930。\n\n## 赞助打赏\n\n[❤️ 赞助 trzsz ❤️](https://github.com/trzsz)，请作者喝杯咖啡 ☕ ? 谢谢您们的支持！\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrzsz%2Ftsshd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrzsz%2Ftsshd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrzsz%2Ftsshd/lists"}