Activate password authentication on Ubuntu VMs on Amazon EC2

ssh -i [path to private-key-file] [target IP]

# In the host shell

sudo adduser [username]     # Add a new user; this command also prompts for setting the password

sudo adduser admin            # Add this user to the admin group (to sudoers)

sudo vi /etc/ssh/sshd_config

# In the above file set "PasswordAuthentication" to "yes".

sudo reload ssh

The VM should now be ready for password based ssh authentication.

Sreekumar Kj
Sreekumar (KJ) has been a hobby programmer from school days. Codemarvels is his personal blog from the year 2010, where he writes about technology, philosophy, society and a bit about physics. He now runs a conversational AI company - DheeYantra - focusing his efforts to help businesses improve operational efficiency using digital employees powered by AI.