shazow / ssh-chat

Chat over SSH.
https://shazow.net/posts/ssh-how-does-it-even/
MIT License
5.59k stars 408 forks source link

Add a client mode #433

Closed sirnewton01 closed 1 month ago

sirnewton01 commented 1 month ago

ssh-chat is quite approachable using plain-old open ssh client, and other ssh clients. Having a dedicated client could open up some new possibilities for usability.

Even faster access to the public chat

If ssh-chat became not just a server, but also a full SSHLA application where it can be both a server and client, then it can build in awareness of the public server. Imagine being able to run this to connect immediately to ssh.chat:

ssh-chat
...
 * Welcome to ssh-chat, enter /help for more.
🐛 Please enjoy our selection of bugs, but run your own server if you want to crash it: https://ssh.chat/issues
🍮 Sponsors get an emoji prefix: https://ssh.chat/sponsor
😌 Be nice and follow our Code of Conduct: https://ssh.chat/conduct

Easier anonymous access

An ssh-chat client could provide some capabilities for anonymous access, such as throw away keys, and randomized user ids, perhaps a few other things to help mask an identity, such as the timezone.

ssh-chat --anonymous
Connecting as "baker123foxtrot" - ssh rsa AKLDFLKJSDLKJfldk394kjl234234

This can create a temporary key for the session, and an ssh config, using these until the process exits where it's all thrown away. The user id and public key can be communicated through a side-band.

Use persistent mosh connections

If mosh is installed, then the ssh-chat client could try using mosh to make persistent connections to a server if #432 is implemented. This is good for laptops that might switch between different wifi networks, for instance.

GUI Mode

Something that not many other SSHLA do is to provide a specialized GUI experience. Imagine if ssh-chat had a GUI reminiscent of other chat clients, with panels for the list of users, scrolling chat history, and a prompt at the bottom. It might automatically reconnect too if it's disconnected.

In this mode it might even support rich text rendering, or even borrow SuperTXT markup, and the rendering view from the Browsing Shell. There's a reusable viewer written in Go there, suitable for GIOUI GUI programs: https://pkg.go.dev/supertxt.net/git/st-int@v0.2.4/viewer