aboutsummaryrefslogtreecommitdiff
path: root/command.go
diff options
context:
space:
mode:
Diffstat (limited to 'command.go')
-rw-r--r--command.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/command.go b/command.go
index cd6a86f..3a6d86f 100644
--- a/command.go
+++ b/command.go
@@ -401,4 +401,9 @@ func (cmd *Command) initSSHClient() {
if err != nil {
log.Fatal("cmd: cannot create new SSH client: " + err.Error())
}
+
+ cmd.env.SSHKey = sshSection.IdentityFile[0]
+ cmd.env.SSHUser = sshSection.User
+ cmd.env.SSHHost = sshSection.Hostname
+ cmd.env.SSHPort = strconv.Itoa(sshSection.Port)
}