AWS

EC2 Ubuntu – Allow SSH root login with Password

JJ
Jobin Joseph · Founder and CEO
·Published 16 August 2016·1 min read

Amazon AWS doesn’t allow root access by default on the OS level. Even though this is for recommended for security purpose, you may need to enable it for some high level operations such as conversion to OVA or VMware etc.

Environment

How to

 PasswordAuthentication yes
 PermitRootLogin without-password

to

 PermitRootLogin yes
 #StrictModes yes
 mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys-disabled
 /etc/init.d/ssh restart
[root@awsadminz ~]# passwd
Changing password for user root.
New password:

Now you can login to the server with the root username and password

ssh -l root IP_ADDRESS -v
Jobin Joseph
Jobin Joseph, Founder and CEO
5x AWS Certified, ISO 27001:2022 Lead Implementer, 17+ years building cloud infrastructure for regulated industries.
About Jobin →

Reading this because your AWS bill or uptime is a problem?

30 minutes, direct with the founder, no sales pitch: one specific recommendation for your AWS workload.

Book a free 30-minute review
30 min Free Consultation →