Return a better message when running without the demo mode

This commit is contained in:
Manfred Touron 2017-11-02 10:32:35 +01:00
parent cf447a84b0
commit 9fc9300c34

View file

@ -55,7 +55,9 @@ func main() {
},
}
app.Action = server
app.Run(os.Args)
if err := app.Run(os.Args); err != nil {
log.Fatalf("error: %v", err)
}
}
func server(c *cli.Context) error {
@ -99,7 +101,7 @@ func server(c *cli.Context) error {
opts := []ssh.Option{}
if !c.Bool("demo") {
return errors.New("POC: real authentication is not yet implemented")
return errors.New("use `--demo` for now")
}
log.Printf("SSH Server accepting connections on %s", c.String("bind-address"))