removed the inlining of ssh password for username=rapl. Now we read value of environment variable named RAPL_PSSWD
This commit is contained in:
parent
971f6833c3
commit
dcf67661e9
2 changed files with 11 additions and 2 deletions
|
@ -4,6 +4,8 @@ import (
|
|||
"github.com/pkg/errors"
|
||||
"golang.org/x/crypto/ssh"
|
||||
"strconv"
|
||||
"os"
|
||||
elekEnv "bitbucket.org/sunybingcloud/elektron/environment"
|
||||
)
|
||||
|
||||
func Cap(host, username string, percentage float64) error {
|
||||
|
@ -15,8 +17,8 @@ func Cap(host, username string, percentage float64) error {
|
|||
sshConfig := &ssh.ClientConfig{
|
||||
User: username,
|
||||
Auth: []ssh.AuthMethod{
|
||||
// TODO: CHANGE and MAKE THIS USE SSH KEY BEFORE MAKING PUBLIC!!!!
|
||||
ssh.Password("pankajlikesdanceswithwolves#!@#"),
|
||||
// TODO: CHANGE and MAKE THIS USE SSH KEY!!!!
|
||||
ssh.Password(os.Getenv(elekEnv.RaplPassword)),
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue