diff --git a/builder/vmware/iso/driver_esx5.go b/builder/vmware/iso/driver_esx5.go index bfeee8d24..9b489ac6b 100644 --- a/builder/vmware/iso/driver_esx5.go +++ b/builder/vmware/iso/driver_esx5.go @@ -15,7 +15,6 @@ import ( "time" vmwcommon "github.com/hashicorp/packer/builder/vmware/common" - commonssh "github.com/hashicorp/packer/common/ssh" "github.com/hashicorp/packer/communicator/ssh" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" @@ -515,7 +514,7 @@ func (d *ESX5Driver) connect() error { } if d.PrivateKey != "" { - signer, err := commonssh.FileSigner(d.PrivateKey) + signer, err := gossh.ParsePrivateKey([]byte(d.PrivateKey)) if err != nil { return err } diff --git a/helper/communicator/step_connect_ssh.go b/helper/communicator/step_connect_ssh.go index 45198d5fd..1a501e330 100644 --- a/helper/communicator/step_connect_ssh.go +++ b/helper/communicator/step_connect_ssh.go @@ -225,7 +225,7 @@ func sshBastionConfig(config *Config) (*gossh.ClientConfig, error) { } if config.SSHBastionPrivateKey != "" { - signer, err := commonssh.FileSigner(config.SSHBastionPrivateKey) + signer, err := gossh.ParsePrivateKey([]byte(config.SSHBastionPrivateKey)) if err != nil { return nil, err }