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 Password Based Authentication on Ubuntu 22.04 Instance

Applies To:

Oracle Cloud Infrastructure - Version Ubuntu 22.04 and later

Goal:

Enable password authentication on OCI Compute Ubuntu Instance.

Solution:

  • Login to OCI Compute Linux (Ubuntu) instance
<ssh_clnt>$ ssh -i <PRIVATE_KEY> ubuntu@<UBUNTU_INSTANCE_IP_ADDRESS>
  • Create a user for password authentication on that Ubuntu instance.
<ssh_serv>$ sudo useradd <USER_NAME>

Example) <ssh_serv>$ sudo useradd testuser
  • Setup a password for the new user.
<ssh_serv>$ sudo passwd <USER_NAME>

Example)
<ssh_serv>$ sudo passwd testuser
  • Backup and edit /etc/ssh/sshd_config to enable PasswordAuthentication.
<ssh_serv>$ sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.backup

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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