Open ssh config file # vim /etc/ssh/sshd_config
#PermitRootLogin yes
Replace this line by:
PermitRootLogin no
In this file we can also change the "Port number" and "Banner" details as well and much more.
# service sshd restart
after when we login as "root" user it will show "Access denied" message.
Now login as a normal user and switch as root.
#PermitRootLogin yes
Replace this line by:
PermitRootLogin no
In this file we can also change the "Port number" and "Banner" details as well and much more.
# service sshd restart
after when we login as "root" user it will show "Access denied" message.
Now login as a normal user and switch as root.
Terima kasih telah membaca artikel tentang How to Disable Root SSH Login on Linux di blog Tutorial Opensource and Linux jika anda ingin menyebar luaskan artikel ini di mohon untuk mencantumkan link sebagai Sumbernya, dan bila artikel ini bermanfaat silakan bookmark halaman ini di web browser anda, dengan cara menekan Ctrl + D pada tombol keyboard anda.