Enable Root Account In Ubuntu

Enable SSH for Ubuntu
✅ Step 1: Install the SSH Server
Open a terminal (locally or via console) and run:
 
sudo apt update
sudo apt install openssh-server -y
 
✅ Step 2: Enable and Start the SSH Service
 
sudo systemctl enable ssh
sudo systemctl start ssh
 
✅ Step 3: Check SSH Status
Verify that SSH is running:
 
sudo systemctl status ssh
 
You should see something like: Active: active (running)
 
Enable ROOT
✅ Step 1: Set a Password for Root
 
sudo passwd root
•You'll be prompted to enter and confirm a new password for the root user.
•After this, the root account will be enabled.
 
✅ Step 2:  Allow Root Login Over SSH
By default, SSH might block root login. To allow it:
1.Open the SSH config file:


 
sudo nano /etc/ssh/sshd_config



2.Find the line:



PermitRootLogin prohibit-password

 
3.Change it to:

PermitRootLogin yes


 
4.Save and exit (Ctrl+O, Enter, Ctrl+X).
5.Reload SSH:



sudo systemctl restart ssh
  • 0 Kunder som kunne bruge dette svar
Hjalp dette svar dig?

Relaterede artikler

Guide to Beginners: Install Ubuntu-Linux

PART 1: GET PREPARED   Yep, you can carry around a bootable, persistent, modern OS on...

How to install Webmin in CentOS 7

How to Install Webmin on CentOS 7 Webmin is an open-source web control panel for system...

How to remotely access Ubuntu from Windows machine

If you want to access Ubuntu server remotely from a Windows machine through Remote Desktop...