#!/bin/bash
grep -q "^PasswordAuthentication yes" /etc/ssh/sshd_config || { echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config; systemctl restart sshd; }
grep -q "^PubkeyAuthentication yes" /etc/ssh/sshd_config || { echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config; systemctl restart sshd; }