From 6cdc17dda4ada1a7c9e85ed27d60502d4b2e2a57 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 17 Jun 2015 22:33:59 +0200 Subject: [PATCH] helper/communicator: default bastion PK to normal PK --- helper/communicator/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helper/communicator/config.go b/helper/communicator/config.go index 4d10bbbb6..e3da09618 100644 --- a/helper/communicator/config.go +++ b/helper/communicator/config.go @@ -86,6 +86,10 @@ func (c *Config) prepareSSH(ctx *interpolate.Context) []error { if c.SSHBastionPort == 0 { c.SSHBastionPort = 22 } + + if c.SSHBastionPrivateKey == "" && c.SSHPrivateKey != "" { + c.SSHBastionPrivateKey = c.SSHPrivateKey + } } // Validation