mail-in-a-box / mailinabox.email

The website at mailinabox.email.
https://mailinabox.email
Creative Commons Zero v1.0 Universal
65 stars 48 forks source link

'PasswordAuthentication no' in /etc/ssh/sshd_config #107

Open 3lliryc opened 7 months ago

3lliryc commented 7 months ago

Hi, I have a message on the GUI in status check:

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'

But in my /etc/ssh/sshd_config: ... Expect .ssh/authorized_keys2 to be disregarded by default in future. AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2

To disable tunneled clear text passwords, change to no here! PasswordAuthentication no PermitEmptyPasswords no ...

Do you have an idea to solve the problem?

Best,

JoshuaCooper commented 6 months ago
# Expect .ssh/authorized_keys2 to be disregarded by default in future.
#AuthorizedKeysFile     .ssh/authorized_keys .ssh/authorized_keys2

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
#PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
KbdInteractiveAuthentication no

My file is untouched from the package maintainer. Are you removing the comments from your post or are they not in the file?