Skip to main content

Using Static Password In Autoscale Group’s VMs

  1. Create a VPC and add a network tier inside the VPC. Using Static Password In AutoScale Group’s VMs

  2. Create a Virtual Machine using the standard templates. Using Static Password In AutoScale Group’s VMs

  3. Launch the console and login with the initial password (Generated at the time of VM Creation).

  4. Run the following commands.

    1. Create own password.
      sudo passwd <yourusername> (ubuntu/root)
    2. Disable the password expiry.
      sudo chage -I -1 -m 0 -M 99999 -E -1 <yourusername> (ubuntu/root)
    3. Ensure password Authentication is enabled (If using SSH). 
      sudo vi /etc/ssh/sshd_config
    4. Make sure the following lines are set correctly.
      PasswordAuthentication yes
    5. Restart the SSH Service.
      sudo systemctl restart ssh
    6. Stop the cloud-init service.
      sudo systemctl stop cloud-init
    7. Uninstall cloud-init.
      sudo apt purge cloud-init -y
      sudo rm -rf /etc/cloud
    8. Remove cloud-init data and configuration.
      sudo rm -rf /var/lib/cloud
      sudo sed -i '/cloud-init/d' /etc/default/grub
    9. Remove any cloud-init entry from the grub.
      sudo update-grub
    10. Reboot the system.
      sudo reboot
  5. Stop The VM from the Apiculus portal and create a Root snapshot of that VM. Using Static Password In AutoScale Group’s VMs

  6. Create Image using the Snapshot. (After creation, it will be visible in the My Image section). Using Static Password In AutoScale Group’s VMs

  7. Navigate to the VPC section, purchase an IPv4 address, and create a load balancing rule using the acquired IPv4 address. Using Static Password In AutoScale Group’s VMs

  8. Create the Auto Scale Group using the custom template (My Image). Using Static Password In AutoScale Group’s VMs

  9. You can now log in to the initial VM using the static password (the same one used for the standard VM). Additionally, you can successfully log in to the secondary VM using the same static password.