cours-snt/test-python-ssh/config/init.sh
2021-02-17 14:25:56 +01:00

14 lines
379 B
Bash
Executable File

#!/bin/bash
echo " ------------------------------ init.sh file ------------------------------"
# Allow SSH as root
if [ -z "$(grep '^PermitRootLogin yes' /etc/ssh/sshd_config)" ] ; then
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
fi
# set root passwd
echo -e "root\nroot" | passwd
echo " ------------------------------ init.sh end -------------------------------"