Jake
Jake

Reputation: 1205

Amazon EC2 Server - Log-in server with root permission

I just got a Amazon EC2 Server and noticed that I can only connect to the server with ec2-user account.

This account doesn't have root permission, therefore, I have to use sudo command on SSH to get root permission.

However, I usually edit code on EditPlus or Aptana Studio to change codes in the file.

I successfully connected the server with ec2-user on EditPlus, but couldn't write other folder files.

ec2-user doesn't have root permission when I log in.

Is there a way to give root permission to ec2-user when it signs in?

Upvotes: 1

Views: 729

Answers (1)

Muthukannan Kanniappan
Muthukannan Kanniappan

Reputation: 2079

You can enable Rootlogin in ssh(how), but it is not a good security practice.. Change the following entry in /etc/ssh/sshd_config file.

 PermitRootLogin yes

There are two ways you can authenticate the root user in ssh.

  1. Keypair
  2. Password

Other way would be to save the modified file in ec2-user home and moving it later using sudo.

Upvotes: 2

Related Questions