From 5dafd636b6afef22a21571bd0af6d334ddb88ed8 Mon Sep 17 00:00:00 2001 From: Florin Grad Date: Wed, 19 Sep 2001 12:18:16 +0000 Subject: RootSshLogin --- init-sh/lib.sh.usermode | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'init-sh/lib.sh.usermode') diff --git a/init-sh/lib.sh.usermode b/init-sh/lib.sh.usermode index 6f1f65e..cb39b61 100644 --- a/init-sh/lib.sh.usermode +++ b/init-sh/lib.sh.usermode @@ -287,6 +287,20 @@ AllowReboot() { echo "done." } +RootSshLogin () { + echo -n "Setting up the root ssh login : " + if [[ $1 == 4 || $1 == 5 ]]; then + /bin/sed 's/PermitRootLogin yes/PermitRootLogin no/' < /etc/ssh/sshd_config > /etc/ssh/sshd_config.new + mv /etc/ssh/sshd_config.new /etc/ssh/sshd_config + chmod 0600 /etc/ssh/sshd_config + else + sed 's/PermitRootLogin no/PermitRootLogin yes/' < /etc/ssh/sshd_config > /etc/ssh/sshd_config.new + mv /etc/ssh/sshd_config.new /etc/ssh/sshd_config + chmod 0600 /etc/ssh/sshd_config + fi +} + + # If we are currently installing our # system with DrakX, we don't ask anything to the user... # Instead, DrakX do it and give us a file with some variable. -- cgit v1.2.1