Awesome
tsshd
The tsshd
works like mosh-server
, while the tssh --udp
works like mosh
.
Advantages
-
Port Forwarding ( same as openssh, includes ssh agent forwarding and X11 forwarding )
-
[TODO] Connection Migration ( supports network switching and reconnection, depends on quic-go#234 )
How to use
-
Install tssh on the client ( the user's machine ).
-
Install tsshd on the server ( the remote host ).
-
Use
tssh --udp
to login to the server. Configure as follows to omit--udp
:Host xxx #!! UdpMode yes #!! TsshdPath ~/go/bin/tsshd
How it works
-
The
tssh
plays the role ofssh
on the client side, and thetsshd
plays the role ofsshd
on the server side. -
The
tssh
will first login to the server normally as an ssh client, and then run a newtsshd
process on the server. -
The
tsshd
process listens on a random udp port between 61000 and 62000, and sends its port number and a secret key back to thetssh
process over the ssh channel. The ssh connection is then shut down, and thetssh
process communicates with thetsshd
process over udp. -
The
tsshd
supportsQUIC
protocol andKCP
protocol (the default isQUIC
), which can be specified on the command line (such as-oUdpMode=KCP
), or configured as follows:Host xxx #!! UdpMode KCP
Installation
-
Install with apt on Ubuntu
<details><summary><code>sudo apt install tsshd</code></summary>
</details>sudo apt update && sudo apt install software-properties-common sudo add-apt-repository ppa:trzsz/ppa && sudo apt update sudo apt install tsshd
-
Install with apt on Debian
<details><summary><code>sudo apt install tsshd</code></summary>
</details>sudo apt install curl gpg curl -s 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x7074ce75da7cc691c1ae1a7c7e51d1ad956055ca' \ | gpg --dearmor -o /usr/share/keyrings/trzsz.gpg echo 'deb [signed-by=/usr/share/keyrings/trzsz.gpg] https://ppa.launchpadcontent.net/trzsz/ppa/ubuntu jammy main' \ | sudo tee /etc/apt/sources.list.d/trzsz.list sudo apt update sudo apt install tsshd
-
Install with yum on Linux
<details><summary><code>sudo yum install tsshd</code></summary>-
Install with gemfury repository.
echo '[trzsz] name=Trzsz Repo baseurl=https://yum.fury.io/trzsz/ enabled=1 gpgcheck=0' | sudo tee /etc/yum.repos.d/trzsz.repo sudo yum install tsshd
-
Install with wlnmp repository. It's not necessary to configure the epel repository for tsshd.
curl -fsSL "https://sh.wlnmp.com/wlnmp.sh" | bash sudo yum install tsshd
-
-
Install with yay on ArchLinux
<details><summary><code>yay -S tsshd</code></summary>
</details>yay -Syu yay -S tsshd
-
Install with Go ( Requires go 1.21 or later )
<details><summary><code>go install github.com/trzsz/tsshd/cmd/tsshd@latest</code></summary>go install github.com/trzsz/tsshd/cmd/tsshd@latest
The binaries are usually located in ~/go/bin/ ( C:\Users\your_name\go\bin\ on Windows ).
</details> -
Build from source ( Requires go 1.21 or later )
<details><summary><code>sudo make install</code></summary>
</details>git clone --depth 1 https://github.com/trzsz/tsshd.git cd tsshd make sudo make install
-
Download from the GitHub Releases, unzip and add to
PATH
environment.
Contact
Feel free to email the author lonnywong@qq.com, or create an issue. Welcome to join the QQ group: 318578930.
Sponsor
❤️ Sponsor trzsz ❤️, buy the author a drink 🍺 ? Thank you for your support!