You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

OCI: How to Enable SSH Login for Local Users on Oracle Linux 9

Goal:

To enable SSH logins for local users on OL9 instances.

Solution:

Changing "PasswordAuthentication" from "no" to "yes" inside /etc/ssh/sshd_config is not enough because OL9 has a drop-in file /etc/ssh/sshd_config.d/50-cloud-init.conf that also contains "PasswordAuthentication no", which will override the same setting inside /etc/ssh/sshd_config.

  • Take a backup of /etc/ssh/sshd_config and /etc/ssh/sshd_config.d/50-cloud-init.conf.
  • Edit both files and change "PasswordAuthentication" from "no" to "yes".
  • Restart sshd.service.
# systemctl restart sshd.service
  • Retest SSH logins for local users.
Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!