Code Monkey home page Code Monkey logo

tsshd's Introduction

tsshd

MIT License GitHub Release 中文文档

The tsshd works like mosh-server, while the tssh --udp works like mosh.

Advantages

  • Low Latency ( based on QUIC / KCP )

  • 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

  1. Install tssh on the client ( the user's machine ).

  2. Install tsshd on the server ( the remote host ).

  3. 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 of ssh on the client side, and the tsshd plays the role of sshd on the server side.

  • The tssh will first login to the server normally as an ssh client, and then run a new tsshd 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 the tssh process over the ssh channel. The ssh connection is then shut down, and the tssh process communicates with the tsshd process over udp.

  • The tsshd supports QUIC protocol and KCP protocol (the default is QUIC), 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

    sudo apt install tsshd
    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

    sudo apt install tsshd
    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

    sudo yum install tsshd
    • 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

    yay -S tsshd
    yay -Syu
    yay -S tsshd
  • Install with Go ( Requires go 1.21 or later )

    go install github.com/trzsz/tsshd/cmd/tsshd@latest
    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 ).

  • Build from source ( Requires go 1.21 or later )

    sudo make install
    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 [email protected], or create an issue. Welcome to join the QQ group: 318578930.

Sponsor

❤️ Sponsor trzsz ❤️, buy the author a drink 🍺 ? Thank you for your support!

tsshd's People

Contributors

lonnywong avatar

Stargazers

Bingbu Cao avatar 软件工程师李飛 avatar ik5 avatar may avatar WEI avatar  avatar 祀画 avatar  avatar 真如赝 avatar acvv_khalil avatar Anthony Barbier avatar Huy Z avatar 刘德洪 avatar Rui An avatar  avatar  avatar  avatar  avatar Shi Yu avatar liubl avatar YunLong avatar maokg avatar  avatar ShenEn avatar jiangzhiming avatar Tenvi avatar TerryWu avatar Jimmy Lee avatar Jaya avatar  avatar Yakov Till avatar Ajam avatar  avatar  avatar  avatar cs8425 avatar Biaogo avatar  avatar 36huo avatar  avatar RandomOS avatar  avatar  avatar  avatar 绅士喵 avatar  avatar

Watchers

Neustradamus avatar  avatar

Forkers

fengjian hentioe

tsshd's Issues

希望可以支持转发xorg

ssh 转发X 和转发端口 的重度用户

ssh转发端口还能凑合

但是转发x 延迟一高 gui界面就容易崩

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.