OCI: How to Enable SSH Login for Local Users on Oracle Linux 9
in Linux
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.
0