diff --git a/builder/amazon/common/ssh.go b/builder/amazon/common/ssh.go index 436d126c1..959f3ce2c 100644 --- a/builder/amazon/common/ssh.go +++ b/builder/amazon/common/ssh.go @@ -29,7 +29,7 @@ func SSHHost(e ec2Describer, sshInterface string, host string) func(multistep.St } if sshInterface == "session_manager" { - return "127.0.0.1", nil + return "localhost", nil } const tries = 2 diff --git a/builder/amazon/common/ssh_test.go b/builder/amazon/common/ssh_test.go index 24a01d8cc..f098613a0 100644 --- a/builder/amazon/common/ssh_test.go +++ b/builder/amazon/common/ssh_test.go @@ -13,7 +13,7 @@ const ( publicIP = "192.168.1.1" privateDNS = "private.dns.test" publicDNS = "public.dns.test" - localhost = "127.0.0.1" + localhost = "localhost" sshHostTemplate = "custom.host.value" )