[HN Gopher] Show HN: Sshx, a web-based collaborative terminal
       ___________________________________________________________________
        
       Show HN: Sshx, a web-based collaborative terminal
        
       Author : ekzhang
       Score  : 70 points
       Date   : 2023-11-05 15:44 UTC (7 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | nolist_policy wrote:
       | You can share the same terminal session to multiple ssh
       | connections with gnu screen btw.
        
         | mike503 wrote:
         | screen -x
         | 
         | However the unique prop here is that it's web-based.
        
           | bitwize wrote:
           | If it isn't web-based, or you can't 'npm i' it, it may as
           | well not exist.
        
             | wiseowise wrote:
             | This, but unironically.
        
         | vulcan01 wrote:
         | Or tmux. I guess neither are as intuitive as clickable buttons
         | though.
        
           | ekzhang wrote:
           | Yep, it was a big inspiration for this. tmux won't sync
           | window sizes properly between viewers though
        
         | gooseyard wrote:
         | I'll plug https://tmate.io/ as well, its incredibly handy
        
           | ekzhang wrote:
           | tmate is an incredible piece of software! The terminal
           | multiplexing is surprisingly similar to the problem of
           | collaboratively sharing terminals, and forking tmux is a
           | really elegant way to handle that. I took a lot of
           | inspiration from other terminal software out there
        
       | teaearlgraycold wrote:
       | Web developers live in the web, but we still need to interface
       | with VMs over SSH. Bridging that gap in favor of the developer is
       | genius. The multiplayer aspect, the shell one-liner to bootstrap
       | the whole process, everything about this is great.
        
         | ekzhang wrote:
         | Thanks! Yeah you can use it anywhere with outbound HTTP network
         | access, whether that's a local VM, cloud instance, laptop, k8s
         | pod, random managed SaaS, serverless function, Raspberry Pi,
         | ...
        
       | skimdesk wrote:
       | Really fun!
       | 
       | I have been experimenting with similar idea myself. I was curious
       | on how you handle instantiating the terminal state for new
       | clients. Seems like you're storing a buffer [0] of past output,
       | and replaying that?
       | 
       | [0]
       | https://github.com/ekzhang/sshx/blob/91c82d46cde4d1ffa0ae34e...
        
         | ekzhang wrote:
         | Yep, it's a rolling 2 MiB buffer in RAM. Also do some
         | snapshotting for persistence / server fault-tolerance, and that
         | size is much smaller.
        
       | cjbprime wrote:
       | Thanks for writing and sharing this!
        
       ___________________________________________________________________
       (page generated 2023-11-05 23:00 UTC)