Commit Graph

22 Commits

Author SHA1 Message Date
Matthew Hooker 970b37077e Merge pull request #4050 from jen20/ssh-agent
builder/amazon: Allow use of local SSH Agent
2016-11-01 17:27:37 -07:00
Rickard von Essen d66490ebfd
Properly cleanup AWS temporary key pairs
Closes #4057 - Amazon key pair no longer cleaned up at end of build
2016-10-27 23:06:13 +02:00
James Nugent 395d88941c amazon: Allow SSH Agent auth for existing key pair
This commit allows SSH Agent authentication to be used with an existing
key pair defined in AWS.
2016-10-23 22:26:14 -05:00
James Nugent 7425fef2c7 builder/amazon: Allow use of local SSH Agent
This commit adds an option to use the local SSH Agent to authenticate
connections to source instances started by the the EBS and Instance
Store builders.

This is of use when the source AMI _already_ has configuration for
authorized SSH keys - for example if one uses an SSH certificate
authority.

A further extension (not implemented in this commit) is to allow SSH
agent use with a pre-defined key pair, in order to allow keys with
passphrases to be used without giving the passphrase to Packer.
2016-10-23 21:43:47 -05:00
Rickard von Essen acc2689b49
builder/amazon: Allow using ssh_private_key_file and ssh_password
This adds support for using amazon-ebs/amazon-instance builder without
a keypair. If a ssh_private_key_file is supplied without a
ssh_keypair_name no temporary ssh keypair is created. If ssh_password is
used no temporary ssh keypair is created and the password is used when
trying to connect.

Closes #2301
Closes #3156
2016-10-02 22:20:36 +02:00
Mitchell Hashimoto 9c0f37b2c9 builder/amazon: fix weird edge cases with key names [GH-2281] 2015-06-19 06:21:20 +02:00
Mitchell Hashimoto de2004c1c9 Merge branch 'master' of https://github.com/nyetsche/packer into nyetsche-master 2015-06-15 15:21:58 -07:00
Seth Vargo 33ca8b7fb5 Migrate to new AWS repo 2015-06-03 17:13:52 -04:00
Mitchell Hashimoto edf3415c6e builder/amazon: delete physical private key for debug mode [GH-1801] 2015-05-29 17:10:14 -07:00
James Nugent e99cd56b6c Migrate from mitchellh/goamz to awslabs/aws-sdk-go
This commit moves the Amazon builders of Packer away from the Hashicorp
fork of the goamz library to the official AWS SDK for Go, in order that
third party plugins may depend on the more complete official library
more easily.
2015-04-12 21:33:09 -04:00
Lesko, Matthew (NIH/NLM/NCBI) [C] 43f08b2664 go fmt all the things 2015-01-13 22:58:41 -05:00
Lesko, Matthew (NIH/NLM/NCBI) [C] 62e054c404 simplify output 2015-01-13 21:40:15 -05:00
Lesko, Matthew (NIH/NLM/NCBI) [C] 9d097f9d4e Permit Temp keys and named SSH keypairs
These changes permit the use of pre-created SSH keypairs with AWS. If
so, the configuration for the builder needs to include an
ssh_keypair_name option and a ssh_private_key_file.

If ssh_private_key_file is *not* defined, it'll go through the
rigamarole of creating a temporary keypair. The ssh_keypair_name option
by itself won't make that change, because it doesn't make sense to
specify a keypair but not tell packer where the private key is, but it
does happen that you could have a private key and the public-key is
"baked in", and not part of your EC2 account.
2015-01-13 16:27:33 -05:00
Lesko, Matthew (NIH/NLM/NCBI) [C] 8c87b1cc00 First attempt for re-using a named EC2 keypair
Adds a 'ssh_keypair_name' option to the configuration
for AWS, along with some munging to create the
temporarily keypair if one isn't specific.

NOT YET WORKING.

From a 'make' I get the following errors:

builder/amazon/ebs/builder.go:94: b.config.SSHKeyPairName undefined
(type config has no field or method SSHKeyPairName)

builder/amazon/instance/builder.go:199: b.config.SSHKeyPairName
undefined (type Config has no field or method SSHKeyPairName)
2015-01-13 13:12:04 -05:00
Florian Noeding 6371b70609 optionally use existing ssh key for amazon builders 2014-03-24 12:47:00 +01:00
Mitchell Hashimoto ed7e0847fd builder/amazon/all: TemporaryKeyPairName
/cc @whostolebenfrog - I actually simplified things quite a bit. I added
a "uuid" global template function so it just uses that now. I renamed it
so that it is clear it is a temporary keypair.
2013-09-05 12:23:08 -07:00
Ben Griffiths f953874448 Allow customization of SSH Key pair pattern
Defined in a template using ssh_keypair_pattern. Defaults to "packer %s"
2013-09-05 13:28:31 +01:00
Mitchell Hashimoto 80ed7eddf4 builder/amazon/chroot: new multistep API 2013-08-31 12:58:55 -07:00
Mitchell Hashimoto 8019cd1839 builder/amazon: don't chmod on windows 2013-08-30 15:04:23 -07:00
Mitchell Hashimoto 4bb320d86f builder/amazon: chmod debug key so it is ssh-ready 2013-08-30 15:03:29 -07:00
Mitchell Hashimoto 57f185451a builder/amazon: drop private key if debug mode [GH-373] 2013-08-30 14:48:50 -07:00
Mitchell Hashimoto 45096d0768 builder/amazon: extract StepKeyPair for both 2013-07-23 22:48:32 -05:00