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

Build for headless usage #3

Merged
merged 1 commit into from
Dec 1, 2015
Merged

Build for headless usage #3

merged 1 commit into from
Dec 1, 2015

Conversation

adammck
Copy link
Contributor

@adammck adammck commented Apr 21, 2015

This tool works very well for me (thanks!), except that I prefer to SSH into new images and provision them with Ansible, rather than using a display or a serial console to set them up interactively. So this PR adds scripts to (a) enable root login over SSH with an empty password, and (b) disable the initial-setup service, since I don't use it.

Of course, this is hilariously insecure and unusable for most people, so I don't expect you to merge this as-is. But I think it'd be a useful option. Any thoughts on how we should make this opt-in? Maybe a HEADLESS=1 environment variable or something?

@sjenning
Copy link
Owner

Thanks for the PR!

I think the better way to do this would be to create a new setting in settings.conf like ROOT_PUBKEY and install a preshared key in /root/.ssh/authorized_keys.

I'm all for letting people shoot themselves in the foot, but this is giving them really big gun :P

@adammck
Copy link
Contributor Author

adammck commented Jun 20, 2015

Bump! I updated this PR based on your feedback.

@sjenning
Copy link
Owner

Other than the chmod'ing of the .ssh stuff, looks good.

@sjenning
Copy link
Owner

Actually, we could make this more automatic by putting the ssh key at a known filename in the resources directory. so bascially, if resources/authorized_keys exists, install that for the root user. Removes the need for ROOT_PUBKEY.

@adammck
Copy link
Contributor Author

adammck commented Nov 29, 2015

Bump. Sorry about the extraordinarily long wait on this, but I've updated this PR based on your feedback. Would you mind taking another look? I'm testing it out right now, and will update again when the changes are verified to work as expected. Seems to work for me.

@sjenning
Copy link
Owner

The final code looks good. Please squash these to a single commit though. No point in adding code just to remove it in the same PR. Thanks!

@adammck
Copy link
Contributor Author

adammck commented Dec 1, 2015

Thanks! Squashed and rebased against master.

sjenning added a commit that referenced this pull request Dec 1, 2015
Build for headless usage
@sjenning sjenning merged commit 8373775 into sjenning:master Dec 1, 2015
@adammck adammck deleted the headless branch December 20, 2015 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants