From 17beb1d7ad47f65947faa9b30f5c656a2df97b9f Mon Sep 17 00:00:00 2001 From: Pawel Kilar Date: Sat, 14 Oct 2017 21:38:44 +0100 Subject: [PATCH] Check if both SSH proxy and basiton are configured --- helper/communicator/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helper/communicator/config.go b/helper/communicator/config.go index d89a0ac27..5ecbdfc65 100644 --- a/helper/communicator/config.go +++ b/helper/communicator/config.go @@ -184,6 +184,10 @@ func (c *Config) prepareSSH(ctx *interpolate.Context) []error { c.SSHFileTransferMethod)) } + if c.SSHBastionHost != "" && c.SSHProxyHost != "" { + errs = append(errs, errors.New("please specify either ssh_bastion_host or ssh_proxy_host, not both")) + } + return errs }