Files
clr-installer/scripts/aws-disable-root.sh
T
Leandro Dorileo 71305a8326 images: add image descriptors
aws, azure, ciao-networking, cloud, containers, gce, and hyperv
image descriptors.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-26 16:03:11 -07:00

28 lines
388 B
Bash
Executable File

#!/bin/bash
# Root login must bedisabled aws images
usage() {
echo "usage: $0 [chrootpath]"
echo "Provide path to existing chroot"
exit 1
}
main() {
local CHROOTPATH=$1
sudo mkdir -p ${CHROOTPATH}/etc/ssh/
sudo echo "PermitRootLogin no" >> ${CHROOTPATH}/etc/ssh/sshd_config
}
if [ $# -eq 0 ]; then
usage
fi
if [ ! -d "$1" ]; then
usage
fi
main $@