mirror of
https://github.com/moul/sshportal.git
synced 2025-01-11 01:47:46 +08:00
Return a better message when running without the demo mode
This commit is contained in:
parent
cf447a84b0
commit
9fc9300c34
1 changed files with 4 additions and 2 deletions
6
main.go
6
main.go
|
@ -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"))
|
||||
|
|
Loading…
Reference in a new issue