From b4d0aa753255aee41a14cc7594c55f30d3415af5 Mon Sep 17 00:00:00 2001 From: Euan Date: Mon, 11 Apr 2016 13:13:19 +0100 Subject: [PATCH] Typo fix and updated readme Updated readme to include chmod 600 on the authorized_keys file to force the correct permissions. --- README.md | 1 + scan/sshutil.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 741ea4a3f1..62cfc2ed00 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,7 @@ Create a keypair then append public key to authorized_keys ```bash $ ssh-keygen -t rsa $ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys +$ chmod 600 ~/.ssh/authorized_keys ``` ## Step3. Install requirements diff --git a/scan/sshutil.go b/scan/sshutil.go index e0da16d0b6..6d0acd2e57 100644 --- a/scan/sshutil.go +++ b/scan/sshutil.go @@ -225,7 +225,7 @@ func sshConnect(c conf.ServerInfo) (client *ssh.Client, err error) { var auths = []ssh.AuthMethod{} if auths, err = addKeyAuth(auths, c.KeyPath, c.KeyPassword); err != nil { - logrus.Fatalf("Faild to add keyAuth. err: %s", err) + logrus.Fatalf("Failed to add keyAuth. err: %s", err) } if c.Password != "" { @@ -240,7 +240,7 @@ func sshConnect(c conf.ServerInfo) (client *ssh.Client, err error) { // log.Debugf("config: %s", pp.Sprintf("%v", config)) notifyFunc := func(e error, t time.Duration) { - logrus.Warnf("Faild to ssh %s@%s:%s. err: %s, Retrying in %s...", + logrus.Warnf("Failed to ssh %s@%s:%s. err: %s, Retrying in %s...", c.User, c.Host, c.Port, e, t) logrus.Debugf("sshConInfo: %s", pp.Sprintf("%v", c)) }