In this brief tutorial I’ll show you how to disable remote SSH login as root account from your Ubuntu 12.04 Server to make it more secure.
To get started, you first need to login your Ubuntu server and then follow the steps below:
1.) Edit the ssh configuration file by running this command:
vi /etc/ssh/sshd_config
2.) Scroll down to find the line said “PermitRootLogin yes”, press I to edit and change it to “PermitRootLogin no”.
3.) Press Esc to exit editing, then press : and type in wq to save the file.
Enjoy!