SSH System Status Check Error
bilogic opened this issue · comments
The SSH server on this machine permits password-based login. A more secure way to log in is using a public key. Add your SSH public key to $HOME/.ssh/authorized_keys, check that you can log in without a password, set the option 'PasswordAuthentication no' in /etc/ssh/sshd_config, and then restart the openssh via 'sudo service ssh restart'.
$ cat /etc/ssh/sshd_config | grep PasswordA
PasswordAuthentication no
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication, then enable this but set PasswordAuthentication
$ sshd -V
unknown option -- V
OpenSSH_8.9p1 Ubuntu-3ubuntu0.7, OpenSSL 3.0.2 15 Mar 2022
usage: sshd [-46DdeiqTt] [-C connection_spec] [-c host_cert_file]
[-E log_file] [-f config_file] [-g login_grace_time]
[-h host_key_file] [-o option] [-p port] [-u len]
I keep getting the above despite having ran sudo mailinabox
and now on v68
. I also verified that PasswordAuthentication
was indeed set to no
, any ideas?
Update
$ sudo sshd -T | grep pass
permitrootlogin without-password
kerberosorlocalpasswd yes
passwordauthentication yes
permitemptypasswords no
I dug into the sources and ran sshd -T
, will update again.
This solved it https://askubuntu.com/a/1440509/1587667
Check sudo vim /etc/ssh/sshd_config.d/50-cloud-init.conf