How to allow an user to SSH to an EC2 Ubuntu instance?

By default ubuntu instances on amazon aws allows only ubuntu user to login through ssh. This is done using the SSH key provided during the initial setup of the instances. There will be scenarious where you would like to create new users. But login through ssh is not enabled by default. To enable it, follow these instructions:

Open the following file:

sudo nano /etc/ssh/sshd_config

Search and Change the following (you can use Ctrl+w to search inside nano)

PasswordAuthentication no


PasswordAuthentication yes

Reload Apache

sudo restart ssh

Leave a Reply