diff --git a/README.md b/README.md index dc86e53..b5ec05c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Usage: Application Options: -v, --verbose Show verbose logging. -i, --identity= Private key to identify server with. (~/.ssh/id_rsa) - --bind= Host and port to listen on. (0.0.0.0:22) + --bind= Host and port to listen on. (0.0.0.0:2022) --admin= Fingerprint of pubkey to mark as admin. --whitelist= Optional file of pubkey fingerprints that are allowed to connect --motd= Message of the Day file (optional) @@ -40,7 +40,7 @@ After doing `go get github.com/shazow/ssh-chat` on this repo, you should be able to run a command like: ``` -$ ssh-chat --verbose --bind ":2022" --identity ~/.ssh/id_dsa +$ ssh-chat --verbose --bind ":22" --identity ~/.ssh/id_dsa ``` To bind on port 22, you'll need to make sure it's free (move any other ssh diff --git a/cmd.go b/cmd.go index 4e78b77..fe6181e 100644 --- a/cmd.go +++ b/cmd.go @@ -27,7 +27,7 @@ import _ "net/http/pprof" type Options struct { Verbose []bool `short:"v" long:"verbose" description:"Show verbose logging."` Identity string `short:"i" long:"identity" description:"Private key to identify server with." default:"~/.ssh/id_rsa"` - Bind string `long:"bind" description:"Host and port to listen on." default:"0.0.0.0:22"` + Bind string `long:"bind" description:"Host and port to listen on." default:"0.0.0.0:2022"` Admin []string `long:"admin" description:"Fingerprint of pubkey to mark as admin."` Whitelist string `long:"whitelist" description:"Optional file of pubkey fingerprints who are allowed to connect."` Motd string `long:"motd" description:"Optional Message of the Day file."` @@ -106,6 +106,8 @@ func main() { } defer s.Close() + fmt.Printf("Listening for connections on %v\n", options.Bind) + host := NewHost(s) host.auth = &auth diff --git a/sshd/doc.go b/sshd/doc.go index aacbcac..21cd914 100644 --- a/sshd/doc.go +++ b/sshd/doc.go @@ -7,7 +7,7 @@ package sshd config := MakeNoAuth() config.AddHostKey(signer) - s, err := ListenSSH("0.0.0.0:22", config) + s, err := ListenSSH("0.0.0.0:2022", config) if err != nil { // Handle opening socket error }