|
@@ -15,8 +15,15 @@ renew_ssh_keys(){
|
|
|
dpkg-reconfigure openssh-server
|
|
dpkg-reconfigure openssh-server
|
|
|
status=$?
|
|
status=$?
|
|
|
}
|
|
}
|
|
|
|
|
+# Disables to avoid error messages
|
|
|
|
|
+systemctl disable ssh
|
|
|
|
|
+systemctl stop ssh
|
|
|
|
|
|
|
|
ls /etc/ssh/ssh_host_*key* > /dev/null 2>&1 && renew_ssh_keys || status=1
|
|
ls /etc/ssh/ssh_host_*key* > /dev/null 2>&1 && renew_ssh_keys || status=1
|
|
|
|
|
+
|
|
|
|
|
+systemctl enable ssh
|
|
|
|
|
+systemctl start ssh
|
|
|
|
|
+
|
|
|
if [ 0 -ne "$status" ]
|
|
if [ 0 -ne "$status" ]
|
|
|
then
|
|
then
|
|
|
# Exit with non zero status
|
|
# Exit with non zero status
|