############# run separately ############sudosu-root# create `ubuntu` account and group if notuseraddubuntu-Um-s/bin/bash# grant no-pass privilege, e.g.echo"ubuntu ALL=(ALL) NOPASSWD: ALL"|&sudotee-a/etc/sudoerssudocat/etc/sudoers|grepubuntu# Configure Diamond Installer public keymkdir-p/home/ubuntu/.ssh/chown-Rubuntu:ubuntu/home/ubuntu/echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8XmMLdUKSH1qzH6o0fuvEi2Ng7jE+88MkZEFe+8fdm+3ioRIVTauV9YRta55FmsTTrtMOnTG4fdT8tg5x3HeROlvn8zN7ZdDTKi5NLvOjswgCOjDvzRFAerry0FPt0HOJP8czHXUU5mvZb4Z/xjegoREY2UDnTfyq0MWvmyFy0ewfNtn7/JKezJX0d7guxPOGUknoSQUQWR6xX4V3ou5Ap1HtE/Ez1Gvb+QwamhY1Gvt/alVjoPu5pwt5KPg8pzHJmhrwGdaDxxPWbs4nJRgY9ONylx2krSTWNbwWjyYgN8Qx6hACHPJchpc3nHvPvoRWzuF71TxQP6gZBViKK6qX diamond@sensetime.io" >> /home/ubuntu/.ssh/authorized_keys
cat/home/ubuntu/.ssh/authorized_keys|grepdiamond# Ensure hostname was configured at local host fileecho"`hostname-I|cut-d ' ' -f1` `hostname`"|sudotee-a/etc/hostscat/etc/hosts# Disable apt package auto upgrade servicesudosystemctlstopapt-daily.serviceapt-daily.timerapt-daily-upgrade.timerapt-daily-upgrade.servicesudosystemctldisableapt-daily.serviceapt-daily.timerapt-daily-upgrade.timerapt-daily-upgrade.service