publicly
Authenticate publicly, chat privately.
Publicly is a lean, invite only chat server over SSH connections.
Quickstart
Install publicly either by downloading a release or building from source.
cargo install --git https://github.com/lavafroth/publicly
Generate a keypair for the administrator.
ssh-keygen -f op -C "op:admin" -t ed25519 -N ""
mv op.pub Authfile
Deploy.
publicly
This binds to port 2222 on all interfaces. Members with the respective private keys can join like so:
ssh 0.0.0.0 -p 2222 -oStrictHostKeyChecking=No -i op
Here, the private key file is named op.
Roadmap
- SSH authentication and authorization
- Emacs-like shortcuts for textarea
- multiline support with
AltReturn - Adjustable parameters:
- history size
- Authfile path
- Listening port number
/addcommand to add new keys/reloadcommand to reload the Authfile/renamecommand/commitcommand to commit in-memory changes to Authfile#mentiontags
Authfile
The Authfile is the source of truth.
Keys can be added via the chat interface with the /add command
but they won't persist over multiple runs of the server
unless they are committed using the /commit command.
Consider the keys in the example Authfile
ssh-ed25519 AAAA... bob@work
ssh-ed25519 AAAA... h@cafe:admin
The Authfile intentionally uses the same format as the ~/.ssh/authorized_keys file,
with the only difference being that it parses the last field, the comment, to assign usernames.
For example, the first key has a comment bob@work which will be the username assigned to
anyone joining with the respective key. Further, bob@work can join only with normal privileges.
h@cafe, whose comment is tagged as :admin will be able to join the chat with admin privileges.
Note
Usernames may only contain ASCII alphanumeric characters and the symbols
@-_.. All other characters will be stripped.