When we do
sudo apt install -y openssh-server it installs by default with password authentication which could be unsafe if the password is too easy, and it already starts listening for connections.
Is there a way to run at first run with public key authenticartion only?
sshd_configbefore installing.