cleaned up and moved commands around
This commit is contained in:
@@ -51,6 +51,13 @@ chown akanealw:akanealw /home/akanealw/.ssh/
|
|||||||
chown akanealw:akanealw /home/akanealw/.ssh/*
|
chown akanealw:akanealw /home/akanealw/.ssh/*
|
||||||
chmod 600 /home/akanealw/.ssh/*
|
chmod 600 /home/akanealw/.ssh/*
|
||||||
|
|
||||||
|
# download user customization script for akanealw
|
||||||
|
mkdir /home/akanealw/scripts > /dev/null 2>&1
|
||||||
|
rm /home/akanealw/scripts/alpine-* > /dev/null 2>&1
|
||||||
|
wget -qO /home/akanealw/scripts/alpine-user-customizations.sh http://192.168.1.50/scripts/alpine/alpine-user-customizations.sh
|
||||||
|
chown -R akanealw:akanealw /home/akanealw/scripts/
|
||||||
|
chmod +x /home/akanealw/scripts/alpine-*
|
||||||
|
|
||||||
# disable ssh password login
|
# disable ssh password login
|
||||||
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
|
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
|
||||||
sed -i "/#PasswordAuthentication yes/c\PasswordAuthentication no" /etc/ssh/sshd_config
|
sed -i "/#PasswordAuthentication yes/c\PasswordAuthentication no" /etc/ssh/sshd_config
|
||||||
@@ -71,3 +78,4 @@ fi
|
|||||||
|
|
||||||
# remove all motd
|
# remove all motd
|
||||||
rm /etc/motd > /dev/null 2>&1
|
rm /etc/motd > /dev/null 2>&1
|
||||||
|
|
||||||
|
|||||||
@@ -14,11 +14,3 @@ wget -qO /root/scripts/alpine-resize-disk.sh http://192.168.1.50/scripts/alpine/
|
|||||||
wget -qO /root/scripts/alpine-user-customizations.sh http://192.168.1.50/scripts/alpine/alpine-user-customizations.sh
|
wget -qO /root/scripts/alpine-user-customizations.sh http://192.168.1.50/scripts/alpine/alpine-user-customizations.sh
|
||||||
|
|
||||||
chmod +x /root/scripts/alpine-*
|
chmod +x /root/scripts/alpine-*
|
||||||
|
|
||||||
if [[ -d /home/akanealw ]]; then
|
|
||||||
mkdir /home/akanealw/scripts > /dev/null 2>&1
|
|
||||||
rm /home/akanealw/scripts/alpine-* > /dev/null 2>&1
|
|
||||||
wget -qO /home/akanealw/scripts/alpine-user-customizations.sh http://192.168.1.50/scripts/alpine/alpine-user-customizations.sh
|
|
||||||
chown -R akanealw:akanealw /home/akanealw/scripts/
|
|
||||||
chmod +x /home/akanealw/scripts/alpine-*
|
|
||||||
fi
|
|
||||||
|
|||||||
Reference in New Issue
Block a user