use ssh.ParsePrivateKey where we can

pull/6613/head
Adrien Delorme 8 years ago
parent bacfb02182
commit fa44a4546f

@ -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
}

@ -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
}

Loading…
Cancel
Save