Update 'Main-Installer.sh'
This commit is contained in:
@@ -43,6 +43,18 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
read -p "Password login uit zetten -> yes/no?" yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* ) sshkey=1
|
||||||
|
break;;
|
||||||
|
[Nn]* ) sshkey=0
|
||||||
|
break;;
|
||||||
|
* ) echo "Kies yes of no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
read -p "Installeer Cockpit -> yes/no?" yn
|
read -p "Installeer Cockpit -> yes/no?" yn
|
||||||
case $yn in
|
case $yn in
|
||||||
@@ -102,7 +114,7 @@ done
|
|||||||
# Pre-Config #
|
# Pre-Config #
|
||||||
##----------------##
|
##----------------##
|
||||||
|
|
||||||
sed -i 's/PermitRootLogin yes/PermitRootLogin prohibit-password/g' /etc/ssh/sshd_config
|
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOtJ4ZiLi+SntA3m54oEJjlA8bE73gggkhGjOaVHsLNo6YmKtZlPaxwWiGvoATv4Vm41WWxKbUWbYGHVTe8DusqKpf/JCgB1r/8rQe828qwaEGXWGxta1Ykq+ndDeBLFGhVp0nNdcnND5HIwarEW4zhBDXUMzYw7IBxPYb48tVIobs/yPN6nSWT2G8FX7XDJNifS+ThVLnCHHS3i/uio8b8jz1oT2s6UH09EBwxg99+0yVaSQV2q8CthDZ8rSgz8pAhQ6FwVfUd9c/PQjtbUSQStvKvr3muv5Q8UnzAvKiO83rsM91aDwv0E6kqpB77BrkpfQXOJNDmdqlnsa2AlkL ICTMaatwerk@Key" >> ~/.ssh/authorized_keys
|
||||||
echo "root:$password" | chpasswd
|
echo "root:$password" | chpasswd
|
||||||
cd /tmp
|
cd /tmp
|
||||||
#mv /boot/grub/menu.lst /boot/grub/menu.lst.bck
|
#mv /boot/grub/menu.lst /boot/grub/menu.lst.bck
|
||||||
@@ -193,6 +205,12 @@ if [ $cockpit = 1 ]; then
|
|||||||
source Slave-Installer.sh
|
source Slave-Installer.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if [ $sshkey = 1 ]; then
|
||||||
|
sed -i 's/PermitRootLogin yes/PermitRootLogin prohibit-password/g' /etc/ssh/sshd_config
|
||||||
|
fi
|
||||||
|
|
||||||
##-------------------##
|
##-------------------##
|
||||||
# Backup Script #
|
# Backup Script #
|
||||||
##-------------------##
|
##-------------------##
|
||||||
|
|||||||
Reference in New Issue
Block a user