whitelist keys

Andrey Petrov 2016-08-19 11:19:25 -04:00
parent 6e3406f665
commit 9c31fb78a8

13
FAQ.md

@ -90,12 +90,11 @@ might be able to check the settings to see if it has URL support.
Usually it's ctrl+click or cmd+click. Usually it's ctrl+click or cmd+click.
## Can I block users from connecting? ## Can I block users from connecting? How do I assign admins?
Yes. `ssh-chat` has a whitelisting feature which allows you to take users' public keys and add them to a `ssh-chat` has whitelisting features which limit access based on ssh public keys. For example, you can whitelist your friends to be the only ones who can connect to the server, or add them to be admins on your server.
whitelist, so that only they may connect when their public key matches the authorized keys given to `ssh-chat`.
You'll need to get your friends' ssh public keys ahead of time and make a file similar to what you'd do on `~/.ssh/authorized_keys` for your ssh server. You'll need to get your friends' ssh public keys ahead of time and make a file similar to what you'd do on `~/.ssh/authorized_keys` for your ssh server, which is one ssh public key per line.
For example, here is how you'd whitelist so that only @shazow can connect to your server: For example, here is how you'd whitelist so that only @shazow can connect to your server:
@ -104,6 +103,12 @@ $ curl https://github.com/shazow.keys >> whitelist_keys
$ ssh-chat --whitelist=$PWD/whitelist_keys ... $ ssh-chat --whitelist=$PWD/whitelist_keys ...
``` ```
Or if you wanted to add everyone who has access to the server as admins:
```bash
$ ssh-chat --admin=$HOME/.ssh/authorized_keys ...
```
## How do I add color escape codes to my motd file? ## How do I add color escape codes to my motd file?
Use an editor that supports ANSI escape codes. For example: Use an editor that supports ANSI escape codes. For example: