EC2 Ubuntu – Allow SSH root login with Password

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

  • Amazon EC2
  • Ubuntu 10.X (Should work with other linux versions too)

How to

  • Open SSH port from the Security Group
  • Enable Password Authentication
 PasswordAuthentication yes
  • Change PermitRootLogin option
 PermitRootLogin without-password

to

 PermitRootLogin yes
  • Comment the below line  with # to Disable StrictModes
 #StrictModes yes
  • Delete authorized_keys
 mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys-disabled
  • Restart SSH service
 /etc/init.d/ssh restart
  • Set root password
[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
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
Scroll to Top