Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provision new user with ssh key #49

Open
zoezhangmattr opened this issue Jul 31, 2024 · 1 comment
Open

provision new user with ssh key #49

zoezhangmattr opened this issue Jul 31, 2024 · 1 comment
Labels
question Further information is requested

Comments

@zoezhangmattr
Copy link

i am new to this functionality, i was wondering what is the good way to provision another user, for example macadmin , (i know the existent default user is ec2-user), and let it have the ability to consume ssh key like ec2-user as well.
is it using the module or user-data. and what is the lifecycle of it. does it provision the user before instance is ready. so that i can use this user to ssh to the mac instance.

any guidance is appreciated.
thanks a lot.

@mattcataws
Copy link
Contributor

Hey @zoezhangmattr, sorry for the delay in my response, but thank you for creating an issue to discuss this problem you're encountering. I have a few questions I was hoping you could answer so we could get a better idea of what your workflow is and what the ideal end goal would be.

i am new to this functionality, i was wondering what is the good way to provision another user, for example macadmin , (i know the existent default user is ec2-user),

EC2 Mac instances are effectively a typical Mac, we see most customers using common macOS system administration tooling like sysadminctl to build derivative images from the standard EC2 AMI.

and let it have the ability to consume ssh key like ec2-user as well.

ec2-macos-init provides a module named SSHKeys that can be configured to fetch the EC2 Key Pair for the specified user at instance launch time. For example, you could replicate the existing configuration for the ec2-user found here — init.toml#L218-228.

is it using the module or user-data. and what is the lifecycle of it. does it provision the user before instance is ready.

ec2-macos-init cannot be reconfigured at instance launch time, so we recommend you prepare images with desired configuration and provisioning steps already completed. In your case, this might mean creating the macadmin user and modifying ec2-macos-init's config file to fetch SSH keys for the new user.

so that i can use this user to ssh to the mac instance.

Are you looking to provision the instance?

@jahkeup jahkeup added the question Further information is requested label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants