OCI: Unable to SSH to Ubuntu Instance Using Password
in Linux
APPLIES TO
Oracle Cloud Infrastructure - Version N/A and later
Linux OS – Ubuntu 22.04
SYMPTOMS:
Unable to ssh to the instance with password even after setting PasswordAuthentication
to yes
in the sshd configuration file /etc/ssh/sshd_config
.
CAUSE:
Incorrect ssh configuration. The configuration file under /etc/ssh/sshd_config.d/
is having PasswordAuthentication
set to no
.
$ sudo cat /etc/ssh/sshd_config.d/disable_password.conf | grep PasswordAuthentication
PasswordAuthentication no
SOLUTION:
- Remove or comment the
PasswordAuthentication no
from the configuration file under/etc/ssh/sshd_config.d/
. - Make sure
PasswordAuthentication yes
is set in/etc/ssh/sshd_config
. - Restart the
Tagged:
0