|
|
|
|
@ -117,10 +117,10 @@ fi
@@ -117,10 +117,10 @@ fi
|
|
|
|
|
|
|
|
|
|
# SSH Server |
|
|
|
|
sudo -E apt-get install -y openssh-server |
|
|
|
|
sudo sed -i 's/#PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config |
|
|
|
|
sudo sed -i 's/PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config |
|
|
|
|
sudo sed -i 's/#PermitRootLogin.*/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config |
|
|
|
|
sudo sed -i 's/PermitRootLogin.*/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config |
|
|
|
|
#sudo sed -i 's/#PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config |
|
|
|
|
#sudo sed -i 's/PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config |
|
|
|
|
#sudo sed -i 's/#PermitRootLogin.*/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config |
|
|
|
|
#sudo sed -i 's/PermitRootLogin.*/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config |
|
|
|
|
sudo sed -i 's/#Port.*/Port 22/' /etc/ssh/sshd_config |
|
|
|
|
sudo sed -i 's/Port.*/Port 22/' /etc/ssh/sshd_config |
|
|
|
|
sudo systemctl enable ssh |
|
|
|
|
@ -166,8 +166,6 @@ sudo pip3 install -e ./modules/mistborn-cli
@@ -166,8 +166,6 @@ sudo pip3 install -e ./modules/mistborn-cli
|
|
|
|
|
|
|
|
|
|
# Mistborn |
|
|
|
|
# final setup vars |
|
|
|
|
iface=$(ip -o -4 route show to default | egrep -o 'dev [^ ]*' | awk 'NR==1{print $2}') |
|
|
|
|
figlet "Mistborn default NIC: $iface" |
|
|
|
|
|
|
|
|
|
#IPV4_PUBLIC=$(ip -o -4 route show default | egrep -o 'dev [^ ]*' | awk '{print $2}' | xargs ip -4 addr show | grep 'inet ' | awk '{print $2}' | grep -o "^[0-9.]*" | tr -cd '\11\12\15\40-\176' | head -1) # tail -1 to get last |
|
|
|
|
IPV4_PUBLIC="10.2.3.1" |
|
|
|
|
@ -188,13 +186,6 @@ sudo systemctl restart unattended-upgrades
@@ -188,13 +186,6 @@ sudo systemctl restart unattended-upgrades
|
|
|
|
|
|
|
|
|
|
# setup Mistborn services |
|
|
|
|
|
|
|
|
|
# install and start base services |
|
|
|
|
# default interface |
|
|
|
|
sudo cp ./scripts/services/Mistborn* /etc/systemd/system/ |
|
|
|
|
sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/User=root/User=$USER/" |
|
|
|
|
#sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/ root:root / $USER:$USER /" |
|
|
|
|
sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/DIFACE/$iface/" |
|
|
|
|
|
|
|
|
|
#if [ "$DISTRO" == "debian" ] || [ "$DISTRO" == "raspbian" ]; then |
|
|
|
|
# # remove systemd-resolved lines |
|
|
|
|
# sudo sed -i '/.*systemd-resolved/d' /etc/systemd/system/Mistborn-base.service |
|
|
|
|
|