For security reason it is recommended that you disable root SSH login to server. To SSH your server with root privileges you should create a new user and assign root privileges to this new user.
In this tutorial, we will assign root privileges to a new user ravi on a CentOS server.
Create a new user on your server whom you want to grant root privileges. Please refer to below tutorial how to create a new user on a Linux Server.
How to create a User on a CentOS Server from SSH
Let us assume that you have create a new user named ravi and you want to assign root privileges to user ravi.
Open /etc/sudoers in any text editor.
Find following code
## Allow root to run any commands anywhere root ALL=(ALL) ALL
Below the details of root’s privileges line, add the following line.
ravi ALL=(ALL) ALL
This will grant all permissions to user ravi.