You have some options:

1) ssh_keypair_name for attaching the pub key to the "main" user, via the
AWS api and cloud-init
2) user-script and cloud-init to add it to users
3) using the "script" provisioner to add pubkeys to ~/.ssh/authorized_keys
(using the file provisioner is not very convenient).


On 6 December 2017 at 06:30, Justin Keller <[email protected]> wrote:

> Sorry, builder is amazon-ebs.
>
> On Tue, Dec 5, 2017 at 9:26 PM, Rickard von Essen <
> [email protected]> wrote:
>
>> Which builder are you using?
>>
>> On Dec 6, 2017 04:06, "Justin" <[email protected]> wrote:
>>
>>> What is the recommend way to add SSH public keys to a remote user's
>>> authorized_keys? Should I just use the file provisioner and transfer a
>>> complete authorized_keys into ~/.ssh? Is there a specific module for this?
>>> Thanks.
>>>
>>> --
>>> This mailing list is governed under the HashiCorp Community Guidelines -
>>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>>> violation of those guidelines may result in your removal from this mailing
>>> list.
>>>
>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>> IRC: #packer-tool on Freenode
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Packer" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/packer-tool/a0b12df9-13d6-4265-ab77-6165984f6af0%40googlegroups.com
>>> <https://groups.google.com/d/msgid/packer-tool/a0b12df9-13d6-4265-ab77-6165984f6af0%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> This mailing list is governed under the HashiCorp Community Guidelines -
>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>> violation of those guidelines may result in your removal from this mailing
>> list.
>>
>> GitHub Issues: https://github.com/mitchellh/packer/issues
>> IRC: #packer-tool on Freenode
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Packer" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/packer-tool/3vYjJD66I5o/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/packer-tool/CALz9Rt985AM4zx3H17M-KhF5TzViL%2BnogWuLnT_fC
>> GwnRO5taA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/packer-tool/CALz9Rt985AM4zx3H17M-KhF5TzViL%2BnogWuLnT_fCGwnRO5taA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Justin Keller (Founder)
> Commando.io - Manage servers easily online.
> [email protected]
> https://commando.io
> Twitter: @commando_io <https://twitter.com/commando_io>
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/CANDUQVrYfLXhm2NCXwYnPveLAES0c%3DXWiL%2BxOgnzSPvLYt8hXQ%
> 40mail.gmail.com
> <https://groups.google.com/d/msgid/packer-tool/CANDUQVrYfLXhm2NCXwYnPveLAES0c%3DXWiL%2BxOgnzSPvLYt8hXQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt-%3DzjgRQ-RWS6EM2nbab8Oct_o3RXbXCc3X2oF_iyWVJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to