From d7ada99c7ad6c5b3269a69ed3c20b54186dc2ee0 Mon Sep 17 00:00:00 2001
From: root <ahmedbilal96@gmail.com>
Date: Fri, 23 Aug 2019 11:12:57 +0000
Subject: [PATCH] PermitRootLogin yes should go to /etc/ssh/sshd_config

---
 ucloud-init.start | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ucloud-init.start b/ucloud-init.start
index 1fc452e..98fa428 100755
--- a/ucloud-init.start
+++ b/ucloud-init.start
@@ -16,6 +16,7 @@ rdnssd -u root -r /etc/resolv.conf
 
 ssh_authorized_keys_path='/root/.ssh/authorized_keys'
 ssh_config_path='/etc/ssh/ssh_config'
+sshd_config_path='/etc/ssh/sshd_config'
 # Initial Package Intallation
 if [ [ $(get_distro) = "alpine" ]; then
 	apk update
@@ -26,8 +27,8 @@ if [ [ $(get_distro) = "alpine" ]; then
 		echo "PasswordAuthentication no" >> $ssh_config_path
 	fi
 	
-	if ! grep -q "PermitRootLogin yes" $ssh_config_path; then
-		echo "PermitRootLogin yes" >> $ssh_config_path
+	if ! grep -q "PermitRootLogin yes" $sshd_config_path; then
+		echo "PermitRootLogin yes" >> $sshd_config_path
 	fi
 	service sshd restart
 else