From aba5ca03fbe0eccf53ce2dcca0a648315b92ae82 Mon Sep 17 00:00:00 2001 From: nato Date: Sun, 5 Feb 2023 14:58:51 -0800 Subject: [PATCH] add and document --keynames options --- cmd/ssh-chat/cmd.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/ssh-chat/cmd.go b/cmd/ssh-chat/cmd.go index 1566a16..8b4e081 100644 --- a/cmd/ssh-chat/cmd.go +++ b/cmd/ssh-chat/cmd.go @@ -38,6 +38,7 @@ type Options struct { Version bool `long:"version" description:"Print version and exit."` Allowlist string `long:"allowlist" description:"Optional file of public keys who are allowed to connect."` Whitelist string `long:"whitelist" dexcription:"Old name for allowlist option"` + Keynames bool `long:"keynames" description:"Reserve usernames by appending them (after a space) to their keys in the admin or allowlist files."` Passphrase string `long:"unsafe-passphrase" description:"Require an interactive passphrase to connect. Allowlist feature is more secure."` } @@ -157,6 +158,8 @@ func main() { } auth.SetAllowlistMode(options.Allowlist != "") + auth.SetKeynamesMode(options.Keynames) + if options.Motd != "" { host.GetMOTD = func() (string, error) { motd, err := ioutil.ReadFile(options.Motd)