I have an AMI image I'd like to update, i.e. start an instance from it, do some edits/updates, and save a new AMI from the instance. But while I do my edits I don't need the full system running, I only need ssh access.
I wonder if I can set something in the "user data" attribute of the instance so that cloud-init runs the instance in a maintenance mode with only sshd, and no other services started.
My target distributions are Debian 7.x, 8.x and Ubuntu 14.04LTS (it makes any difference).