summaryrefslogtreecommitdiff
path: root/ssh.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-25 00:39:14 -0600
committerJeff Carr <[email protected]>2024-01-25 00:39:14 -0600
commit41fe4a4659d50d70a835224405490588019d24ff (patch)
treedd6677fb17d11a4233568fddf0d3a141434bba10 /ssh.go
parente24c2c2eb3feb5083a74a9b2cb396bcbcb0ac52d (diff)
new homev0.13.0
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'ssh.go')
-rw-r--r--ssh.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/ssh.go b/ssh.go
index 7882ada..67b5c22 100644
--- a/ssh.go
+++ b/ssh.go
@@ -5,23 +5,23 @@ import (
"io/ioutil"
"time"
- "golang.org/x/crypto/ssh"
"github.com/tmc/scp"
"go.wit.com/log"
+ "golang.org/x/crypto/ssh"
)
var sshHostname string
-var sshPort int
-var sshUsername string
-var sshPassword string
-var sshKeyfile string
+var sshPort int
+var sshUsername string
+var sshPassword string
+var sshKeyfile string
func SSHclientSet(hostname string, port int, username string, pass string, keyfile string) {
- sshHostname = hostname
- sshPort = port
- sshUsername = username
- sshPassword = pass
- sshKeyfile = keyfile
+ sshHostname = hostname
+ sshPort = port
+ sshUsername = username
+ sshPassword = pass
+ sshKeyfile = keyfile
}
func SSHclientSCP(localfile string, remotefile string) {
@@ -49,7 +49,7 @@ func mySsh(hostname string, port int, username string, pass string, keyfile stri
// log.Log(SSH, "hostkey =", hostKey)
publicKey, err := PublicKeyFile(keyfile)
- if (err != nil) {
+ if err != nil {
log.Log(SSH, "PublicKeyFile() error =", err)
}
@@ -75,7 +75,7 @@ func mySsh(hostname string, port int, username string, pass string, keyfile stri
ssh.KeyAlgoED25519,
},
// optional tcp connect timeout
- Timeout: 5 * time.Second,
+ Timeout: 5 * time.Second,
}
sport := fmt.Sprintf("%d", port)