Skip to content

Commit f313115

Browse files
authored
Merge pull request #21 from hloeffler/master
output port
2 parents 39bc88b + 398834c commit f313115

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: _example/public_key/public_key.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ func main() {
1717

1818
publicKeyString := keyType + " " + b64.StdEncoding.EncodeToString(s.PublicKey().Marshal())
1919

20-
io.WriteString(s, "Hello "+user+"\n")
21-
io.WriteString(s, "your publicKey:\n")
22-
io.WriteString(s, publicKeyString+"\n")
20+
io.WriteString(s, "Hello "+user+"\n\n")
21+
io.WriteString(s, "your public key:\n")
22+
io.WriteString(s, publicKeyString+"\n\n")
2323
})
2424

2525
publicKeyHandler := ssh.PublicKeyAuth(func(user string, key ssh.PublicKey) bool {
26-
//allow all
26+
// allow all keys
2727
// use ssh.KeysEqual() to compare agains know keys
2828
return true
2929
})
3030

31+
log.Println("starting ssh server on port: 2222")
3132
log.Fatal(ssh.ListenAndServe(":2222", nil, publicKeyHandler))
32-
3333
}

Diff for: _example/simple/simple.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ func main() {
1414
io.WriteString(s, "Hello "+user+"\n")
1515
})
1616

17+
log.Println("starting ssh server on port: 2222")
1718
log.Fatal(ssh.ListenAndServe(":2222", nil))
18-
1919
}

0 commit comments

Comments
 (0)