cancel
Showing results for 
Search instead for 
Did you mean: 
  • 318 Views

sshd_config PasswordAuthentication problem

Jump to solution

Hi

I would like to point out a problem.

RHEL9.3
User operator3 from serverb connects via server password despite good /etc/ssh/sshd_config settings on servera.

operator2@serverb~]$ ssh operator3@servera


Settings in /etc/ssh/sshd_config on servera

PasswordAuthentication no
service was reloaded
chapter 9 off 

Guided Exercise: Customize OpenSSH Service Configuration

can you verify this SVP?

1 Solution

Accepted Solutions
Chetan_Tiwary_
Community Manager
Community Manager
  • 303 Views

@bkonopincorp The problem is due to the extra config file in /etc/ssh/sshd_config.d/50-cloud-init.conf  which is overwriting the sshd_config parameter.

as workaroud - After setting the entries in the sshd_config file , also comment out the entry in the /etc/ssh/sshd_config.d/50-cloud-init.conf file and then do the lab again - it will work as expected.

The error will be fixed soon ( probably in a new / maintenance release of the course ).

View solution in original post

2 Replies
Chetan_Tiwary_
Community Manager
Community Manager
  • 304 Views

@bkonopincorp The problem is due to the extra config file in /etc/ssh/sshd_config.d/50-cloud-init.conf  which is overwriting the sshd_config parameter.

as workaroud - After setting the entries in the sshd_config file , also comment out the entry in the /etc/ssh/sshd_config.d/50-cloud-init.conf file and then do the lab again - it will work as expected.

The error will be fixed soon ( probably in a new / maintenance release of the course ).

  • 230 Views

It seems there might be an issue with the SSH configuration on servera. Double-check the syntax in /etc/ssh/sshd_config for any errors, and ensure there are no conflicting settings in other configuration files or directories like /etc/ssh/sshd_config.d/. Verify that the SSH service has been properly reloaded or restarted with systemctl status sshd. Additionally, consider if cached credentials might be affecting the connection and review the SSH logs (/var/log/secure or /var/log/auth.log) for any related warnings or errors. These steps should help resolve why password authentication is still working despite the PasswordAuthentication no setting.

Join the discussion
You must log in to join this conversation.