diff --git a/files/installer.sh b/files/installer.sh index 63df12972b2a4841f157eeef99acffabd3a18586..eaa06f293cb70b4ffe0a3090f001c39448647c0c 100755 --- a/files/installer.sh +++ b/files/installer.sh @@ -14,3 +14,18 @@ then . /opt/runinstaller.sh fi +beginLogEntry "install fstab in target" +cp /tmp/fstab.local /target/etc/fstab +finishLogEntry "done" + +beginLogEntry "configure ssh in target" +sed -i -e 's/^#PermitRootLogin.*/PermitRootLogin prohibit-password/g' /target/etc/ssh/sshd_config +sed -i -e 's/^#AuthorizedKeysFile/AuthorizedKeysFile/g' /target/etc/ssh/sshd_config +sed -i -e 's/^\(AuthorizedKeysFile.*\)$/\1 \/etc\/ssh\/authorized_keys/g' /target/etc/ssh/sshd_config +finishLogEntry "done" + +beginLogEntry "install ssh key in target" +cp /opt/ansible.pub /target/etc/ssh/authorized_keys +chmod 644 /target/etc/sshd/authorized_keys +finishLogEntry "done" +