File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments