How to enable root user ssh login in Ubuntu 16.04, 17.04, 18.04, 19.04

How to enable root user ssh login in Ubuntu 16.04, 17.04, 18.04 , 19.04

Remote login with root user is never recommended as If a user gets access on your system by root. The user can do anything in your system can delete any files. so that system can become unfunctional. So, root login is not recommended in live server. but for your local environment or for your knowledge purpose you can do this.

1) Install Openssh-server package.

sudo apt update -y
sudo apt install openssh-server -y

2) Start and Enable the service.

sudo systemctl start ssh
sudo systemctl enable ssh

3) Now we need to make some changes it the configuration file of ssh. which is in "/etc/ssh/sshd_config" this file is the main configuration file for ssh.
Their is a parameter in this file "#PermitRootLogin" which is responsible for managing root login we need to uncomment this line and add "PermitRootLogin yes" or you can run the ffollowing command to do this process.

sudo echo "PermitRootLogin yes" >> /etc/ssh/sshd_config

4) Now we need to restart the ssh service.

sudo systemctl restart sshd

5) Now we can ssh to root user to take remote login.

ssh root@remote_ip
  • 0 Los Usuarios han Encontrado Esto Útil
¿Fue útil la respuesta?

Related Articles

วิธีทำ Virtual Host บน XAMPP ในระบบปฏิบัติการ Windows

วิธีทำ Virtual Host บน XAMPP ในระบบปฏิบัติการ Windows Virtual Host คืออะไร ? Virtual Host...

สอนการเปลี่ยน Port remote desktop สำหรับ Windows

วันนี้จะมาแนะนำวิธีเปลี่ยน Port ของ Remote Desktop ใน Windows 10, Windows 8.1 และ Windows 7...

อัพเกรด Windows Server 2012 Trail To Full

How to upgrade Windows Server 2012 R2 evaluation version to full version 8 Replies On a...

สอนการตั้งค่า การเปิด Firewall ให้สามารถใช้ Remote Desktop ได้

1. เข้าไปตั้งค่าใน Windows Firewall ให้ Allow App Remote Desktop1.1 Control Panel --> Windows...

(Vmware) How to install VMware Tools on Debian, Ubuntu and CentOS

How to install VMware Tools on Debian, Ubuntu and CentOS go to VM > Guest >...

Powered by WHMCompleteSolution