Linux – How to configure ssh access for an unattended linux-distro ISO image for local development env similar to accessing cloud service VM instances

automated-installdebianlinuxpackerssh

I configured Packer to build unattended ISO installs of various Debian-derived distros to VMware fusion. As I configure the VMs manually for ssh access, it times out and the build artifacts created are erased.

How do you go about pre-installing ssh access as part of an OS installation image similar to how its done for cloud service VM instances? I am going to try to configure it via kickstart or Debian preseed late-command into the remastered ISO image to resolve my problem but i would be interested to hear other methods that are more flexible. The goal of all this is to create a development infrastructure that can easily be brought up and down in an automated fashion that can be used to simulate a cloud environment locally.

Best Answer

You could pre-install the Userify agent on the ISO's. These will keep your SSH keys updated over time and allow you to create users (sudo perms, etc) remotely. It only needs outbound HTTPS, so it should easily work from a VM unless you've shut off outbound net access.

Related Topic