Commit b3f07dfb authored by Eric's avatar Eric

rename func name

parent 203ca450
...@@ -30,7 +30,7 @@ func init() { ...@@ -30,7 +30,7 @@ func init() {
func StartServer() { func StartServer() {
serverSig := getPrivatekey(SSHKeyPath) serverSig := getPrivateKey(SSHKeyPath)
ser := ssh.Server{ ser := ssh.Server{
Addr: "0.0.0.0:" + strconv.Itoa(SSHPort), Addr: "0.0.0.0:" + strconv.Itoa(SSHPort),
PasswordHandler: authService.SSHPassword, PasswordHandler: authService.SSHPassword,
......
...@@ -6,7 +6,7 @@ import ( ...@@ -6,7 +6,7 @@ import (
gossh "golang.org/x/crypto/ssh" gossh "golang.org/x/crypto/ssh"
) )
func getPrivatekey(keyPath string) gossh.Signer { func getPrivateKey(keyPath string) gossh.Signer {
privateBytes, err := ioutil.ReadFile(keyPath) privateBytes, err := ioutil.ReadFile(keyPath)
if err != nil { if err != nil {
log.Fatal("Failed to load private key: ", err) log.Fatal("Failed to load private key: ", err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment