From 9c31fb78a8ddf5236f8b20b591e4309820a01a94 Mon Sep 17 00:00:00 2001 From: Andrey Petrov Date: Fri, 19 Aug 2016 11:19:25 -0400 Subject: [PATCH] whitelist keys --- FAQ.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/FAQ.md b/FAQ.md index 4a611a0..f0977a0 100644 --- a/FAQ.md +++ b/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. -## 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 -whitelist, so that only they may connect when their public key matches the authorized keys given to `ssh-chat`. +`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. -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: @@ -104,6 +103,12 @@ $ curl https://github.com/shazow.keys >> 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? Use an editor that supports ANSI escape codes. For example: