I have aws server and when I login it logs me in as ubuntu user. Is there a way to enter as a root user. If so, how? I am using the pem file. Also if there is a way, then whats root password
Ubuntu by default does not use root so remote ssh login with root is disabled. You can set a root password and set PermitRootLogin to yes in sshd configuration to allow that, however, since ubuntu user has sudo All, it is really all you need. You must have a very good reason to make the change, really.