File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -17,17 +17,17 @@ func main() {
17
17
18
18
publicKeyString := keyType + " " + b64 .StdEncoding .EncodeToString (s .PublicKey ().Marshal ())
19
19
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 " )
23
23
})
24
24
25
25
publicKeyHandler := ssh .PublicKeyAuth (func (user string , key ssh.PublicKey ) bool {
26
- //allow all
26
+ // allow all keys
27
27
// use ssh.KeysEqual() to compare agains know keys
28
28
return true
29
29
})
30
30
31
+ log .Println ("starting ssh server on port: 2222" )
31
32
log .Fatal (ssh .ListenAndServe (":2222" , nil , publicKeyHandler ))
32
-
33
33
}
Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ func main() {
14
14
io .WriteString (s , "Hello " + user + "\n " )
15
15
})
16
16
17
+ log .Println ("starting ssh server on port: 2222" )
17
18
log .Fatal (ssh .ListenAndServe (":2222" , nil ))
18
-
19
19
}
You can’t perform that action at this time.
0 commit comments