First forgive me if you have already posted this instruction and it is only helpful to those in need, and sorry for the translation as I do not speak other languages well.
If you purchased a dedicated server and this server does not have the active root user these instructions are for you!
1 - Open the terminal of your choice, in my case I use (Putty).
2- Enter the login data of your dedicated server, users, port and password.
3- After accessing the server with your username and password make sure you switch to root with the sudo su command.
4- Install the Openssh-server package with the commands below.
Run one at a time.
sudo apt update -y
sudo apt install openssh-server -y
5- Start and activate the service with the following commands.
Run one at a time.
sudo systemctl start ssh
sudo systemctl enable ssh
6- Now we need to make some changes to the ssh configuration file which is in " /etc/ssh/sshd_config", this file is the main ssh configuration file.
This is a parameter in this "#PermitRootLogin" file, which is responsible for managing the root login. We need to uncomment this line and add "PermitRootLogin yes" or you can run the following command to perform this process.
sudo echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
7- Now we need to change the root password, for that run command below and set the password and repeat the same password set.
passwd root
8- Now we need to restart the ssh service by running command below.
/etc/init.d/ssh restart
or
sudo systemctl restart sshd
Now just exit and try root access, I'm available for help if you need to. Hope this helps.
If you purchased a dedicated server and this server does not have the active root user these instructions are for you!
1 - Open the terminal of your choice, in my case I use (Putty).
2- Enter the login data of your dedicated server, users, port and password.
3- After accessing the server with your username and password make sure you switch to root with the sudo su command.
4- Install the Openssh-server package with the commands below.
Run one at a time.
sudo apt update -y
sudo apt install openssh-server -y
5- Start and activate the service with the following commands.
Run one at a time.
sudo systemctl start ssh
sudo systemctl enable ssh
6- Now we need to make some changes to the ssh configuration file which is in " /etc/ssh/sshd_config", this file is the main ssh configuration file.
This is a parameter in this "#PermitRootLogin" file, which is responsible for managing the root login. We need to uncomment this line and add "PermitRootLogin yes" or you can run the following command to perform this process.
sudo echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
7- Now we need to change the root password, for that run command below and set the password and repeat the same password set.
passwd root
8- Now we need to restart the ssh service by running command below.
/etc/init.d/ssh restart
or
sudo systemctl restart sshd
Now just exit and try root access, I'm available for help if you need to. Hope this helps.