File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ if ! [ -d /home/$USERNAME ]; then
39
39
rm -f /home/$USERNAME /.bashrc
40
40
fi
41
41
42
+ # also set the same password for root
43
+ echo " root:$PASS " | chpasswd
44
+
42
45
# add empty ~/.ssh/authorized_keys (see #80)
43
46
function add_authorized_keys_file() {
44
47
SSH_AUTHORIZED_KEYS=/home/$1 /.ssh/authorized_keys
@@ -56,8 +59,8 @@ add_authorized_keys_file "root"
56
59
userdel -r -f alarm || true
57
60
58
61
# configure ssh
59
- grep ' PermitRootLogin' /etc/ssh/sshd_config && sed -i ' s/^.*PermitRootLogin.*$/PermitRootLogin without-password /' /etc/ssh/sshd_config
60
- grep ' PermitRootLogin' /etc/ssh/sshd_config || echo " PermitRootLogin without-password " >> /etc/ssh/sshd_config
62
+ grep ' PermitRootLogin' /etc/ssh/sshd_config && sed -i ' s/^.*PermitRootLogin.*$/PermitRootLogin yes /' /etc/ssh/sshd_config
63
+ grep ' PermitRootLogin' /etc/ssh/sshd_config || echo " PermitRootLogin yes " >> /etc/ssh/sshd_config
61
64
grep -x ' X11Forwarding yes' /etc/ssh/sshd_config || echo " X11Forwarding yes" >> /etc/ssh/sshd_config
62
65
63
66
# build all the tools
You can’t perform that action at this time.
0 commit comments