Commit Graph

110 Commits

Author SHA1 Message Date
Megan Marsh 38cc525ec7 new option allowing user to clean up the ephemeral ssh key from the authorized_keys file 2018-09-14 11:06:38 -07:00
Adrien Delorme b0c09087a2 move SSHInterface/SSHIPVersion fields to communitator.Config struct 2018-08-29 14:51:28 +02:00
Adrien Delorme 1d219cecaf add SSHTemporaryKeyPairName to communicator.Config 2018-08-29 14:40:33 +02:00
Adrien Delorme 9a9b82715b config.Comm.SSHKeyPair => SSHKeyPairName 2018-08-29 14:40:33 +02:00
Adrien Delorme 77a57f0354 communicator.Config: `mapstructure:"ssh_key_pair"` => ssh_keypair_name 2018-08-29 14:40:33 +02:00
Adrien Delorme 69dfe2565b SSHBastionPrivateKey => SSHBastionPrivateKeyFile 2018-08-29 14:40:33 +02:00
Adrien Delorme 5369c15459 helper: communicator.SSHFileSigner => ssh.FileSigner
* had to to avoid circular dependency
* this commit fixes #6631 ( esxi cannot be reached by ssh )
2018-08-29 14:40:33 +02:00
Adrien Delorme b83c72fd54 more private keys in config 2018-08-29 14:40:32 +02:00
Adrien Delorme 663c8134ef GCP: put ssh public/private key in config 2018-08-29 14:40:32 +02:00
Adrien Delorme 51d2aac9f6 SSHPrivateKey => SSHPrivateKeyFile 2018-08-29 14:40:32 +02:00
Matthew Hooker e41e99954d
go 1.11 format rules 2018-08-24 15:56:44 -07:00
Megan Marsh 340363a649
Merge pull request #6613 from hashicorp/merge_ssh_config_funcs
Merge ssh config funcs from builders
2018-08-23 16:03:36 -07:00
Adrien Delorme fa44a4546f use ssh.ParsePrivateKey where we can 2018-08-22 18:23:09 +02:00
Adrien Delorme bacfb02182 doc better SSHConfigFunc 2018-08-22 18:16:25 +02:00
Adrien Delorme ab7f998862 SSHConfigFunc: use struct fields instead of copying them locally 2018-08-22 17:08:46 +02:00
Adrien Delorme 0ff7c1da87 SSHConfigFunc: append the ssh auth ways 2018-08-22 17:03:25 +02:00
Adrien Delorme 41f6e0334d refactor all copy pasted sshConfig with into communicator.Config.SSHConfigFunc
* still need to append the auth methods into an array for gracefullness
2018-08-22 17:02:23 +02:00
Megan Marsh ff6a039d5b replace scrubconfig with packer.LogSecretFilter.Set
filter winrm password from logs
Add new root-level packer template option, sensitive-variables, to tell us what user variables to mark sensitive.
2018-08-20 15:35:55 -07:00
Ali Rizvi-Santiago a3cec4f274 Emit both the host and the communicator to the user during StepConnect. 2018-07-29 02:18:26 -05:00
Megan Marsh 3afb243f11 use build name to ensure that winrm password and other shared state is not overwritten if two builders need the password in the same packer run. 2018-04-16 13:41:17 -07:00
Seth Vargo b193b96f76
Include arch and os 2018-04-05 14:28:50 -04:00
Seth Vargo b17b333e29
Add a common package for specifying useragent and adopt that everywhere
There were 5 different formats for the Packer useragent string. This
fixes that and unifies it into a helper package.

I did not touch oracle's user-agent, because it looked kinda special.
2018-04-05 14:28:50 -04:00
Megan Marsh 4e32d0da24 stricter permissions on shared state file since it now contains a password 2018-03-16 14:11:32 -07:00
Megan Marsh 4d19f4f8b6 add all the new files 2018-03-14 15:58:12 -07:00
Josh Soref 64aae1c781 spelling: occurring 2018-03-13 08:16:48 +00:00
Josh Soref 5e167e3b6d spelling: accumulates 2018-03-13 07:03:51 +00:00
SwampDragons 5af42ee9e2
Revert "Add `winrm_no_proxy` option." 2018-02-08 15:10:53 -08:00
Matthew Hooker 22666153f9
Add `winrm_no_proxy` option.
Setting this adds the remote host:ip to the `NO_PROXY` environment
variable.
2018-02-07 20:58:08 -08:00
Matthew Hooker 63f1673909
ssh deadlines 2018-01-31 12:35:25 -08:00
Matthew Hooker cab52872f4
add session level keep-alives for ssh communicator 2018-01-30 22:00:37 -08:00
Matthew Hooker 3e2895afec
comments 2018-01-24 17:09:18 -08:00
Matthew Hooker 2afd81741c
use correct context 2018-01-24 17:09:18 -08:00
Matthew Hooker ce4f30c5ae
fix tests 2018-01-24 17:09:17 -08:00
Matthew Hooker 8cd403425e
test fixes WIP 2018-01-24 17:09:17 -08:00
Matthew Hooker 5d48d658b4
Wire context through misc steps
Some steps actually need to pass the context around, so let's create
a ctx variable and pass it.
2018-01-24 17:09:17 -08:00
Matthew Hooker 7a189a83a1
fix imports
`find . -type f -name '*.go' -not -path "./vendor/*" -exec goimports -w {} \;`
2018-01-24 17:09:17 -08:00
Matthew Hooker a831d522be
change run signatures
Run now takes a context as well as a statebag. We'll assign the context
to the blank identifier to prevent namespace collisions. We'll let the
step authors opt-in to using the context.

`find . -iname "step_*.go" -exec gsed -i'' 's/func \(.*\)Run(/func \1Run(_ context.Context, /' {} \;`
2018-01-24 17:09:17 -08:00
Matthew Hooker a0c625ea44
Revert "working with opt-in"
This reverts commit 4068ffdaf541354e75507add7ca0b193993fcd52.
2018-01-24 17:09:16 -08:00
Matthew Hooker e98f201602
working with opt-in 2018-01-24 17:09:16 -08:00
Matthew Hooker 62e3d1362f
pass context through step.run again 2018-01-24 17:09:16 -08:00
Matthew Hooker 030b5fd4f0
WIP add context to state bag 2018-01-24 17:09:16 -08:00
Matthew Hooker 07a5af66f8
remove ctx arg from step.run 2018-01-24 17:09:15 -08:00
Matthew Hooker 366dc3da0a
move multistep imports to helper.
gomvpkg -from "github.com/mitchellh/multistep" -to "github.com/hashicorp/packer/helper/multistep"
2018-01-24 17:09:15 -08:00
Matthew Hooker 89d43256bb
pass context into step.run 2018-01-24 17:09:15 -08:00
Matthew Hooker 807e88245b
trying to add context to state bag 2018-01-24 17:09:15 -08:00
Pawel Kilar 17beb1d7ad Check if both SSH proxy and basiton are configured 2017-10-14 21:38:44 +01:00
Paul Kilar d9b404fa00 SOCKS5 proxy support 2017-10-10 15:04:15 +01:00
Megan Marsh 959db1ac16 add echo test to winrm connection. 2017-09-01 15:26:41 -07:00
Rickard von Essen 4f6010aa26
ssh: Renamed ssh_disable_agent to ssh_disable_agent_forwarding
Closes: #4941
2017-06-19 16:26:18 +02:00
Lee Spottiswood 8473a1148c Add 'winrm_use_ntlm' configuration directive for NTLM authentication support 2017-06-07 12:08:12 +01:00