sudo -e '/etc/ssh/sshd_config'
sshd_config
to make sure sshd_config.d
is included/etc/ssh/sshd_config.d
echo 'PasswordAuthentication no' | sudo tee '/etc/ssh/sshd_config.d/custom-pubkey-only.conf' > '/dev/null' && cat '/etc/ssh/sshd_config.d/custom-pubkey-only.conf'
sudo -e '/etc/ssh/sshd_config.d/custom-pubkey-only.conf'
chmod '400' ~/'.ssh/authorized_keys'
echo 'PermitRootLogin no' | sudo tee '/etc/ssh/sshd_config.d/custom-root-login-disable.conf' > '/dev/null' && cat '/etc/ssh/sshd_config.d/custom-root-login-disable.conf'
sudo -e '/etc/ssh/sshd_config.d/custom-root-login-disable.conf'