Managing remote SSH authorized_key file

36 views
Skip to first unread message

Justin

unread,
Dec 5, 2017, 10:06:16 PM12/5/17
to Packer
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.

Rickard von Essen

unread,
Dec 6, 2017, 12:26:19 AM12/6/17
to packe...@googlegroups.com
Which builder are you using? 

On Dec 6, 2017 04:06, "Justin" <jus...@commando.io> 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 packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/a0b12df9-13d6-4265-ab77-6165984f6af0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Justin Keller

unread,
Dec 6, 2017, 12:30:14 AM12/6/17
to packe...@googlegroups.com
Sorry, builder is amazon-ebs.

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/topic/packer-tool/3vYjJD66I5o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CALz9Rt985AM4zx3H17M-KhF5TzViL%2BnogWuLnT_fCGwnRO5taA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
Justin Keller (Founder)
Commando.io - Manage servers easily online.
jus...@commando.io
https://commando.io
Twitter: @commando_io

Rickard von Essen

unread,
Dec 8, 2017, 8:06:37 AM12/8/17
to packe...@googlegroups.com
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).


Reply all
Reply to author
Forward
0 new messages