From e9327b51f569a56a9eaa71d7a68263848a1c1c1a Mon Sep 17 00:00:00 2001 From: fpicot Date: Thu, 26 Sep 2019 10:06:40 -0400 Subject: [PATCH] fix ssh agent auth with bastion host --- hosts/dialer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/dialer.go b/hosts/dialer.go index 1f730f3e..289fc2df 100644 --- a/hosts/dialer.go +++ b/hosts/dialer.go @@ -232,7 +232,7 @@ func BastionHostWrapTransport(bastionHost v3.BastionHost) (transport.WrapperFunc useSSHAgentAuth: bastionHost.SSHAgentAuth, } - if bastionDialer.sshKeyString == "" { + if bastionDialer.sshKeyString == "" && !bastionDialer.useSSHAgentAuth { var err error bastionDialer.sshKeyString, err = privateKeyPath(bastionHost.SSHKeyPath) if err != nil {