[SelHhosting] Becoming root user in the instance

Firstly, our AMIMOTO AMI does not accept ssh access as a root user: 

$ ssh -i path-to-key-file root@IP-Address 
Please login as the user "ec2-user" rather than the user "root".

So, you should access to the instance with ec2-user, like:

$ ssh -i path-to-key-file ec2-user@IP-Address

Then  type sudo su - and hit return key

[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo su - 
[root@ip-xxx-xxx-xxx-xxx ~]#

 The prompt has changed from $ to #.

When you think logout root user and becoming ec2-user, simply type exit then hit the return key. The prompt changes from # into $.

[root@ip-xxx-xxx-xxx-xxx ~]# exit
[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ 
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk