In order to disable root access to SSH you’ll need to edit the sshd_config file. So open it up with your favorite text editor..
nano /etc/ssh/sshd_config
The line we are looking for is:
#PermitRootLogin yes
You can uncomment this line, then change the yes to no to disable root login.
PermitRootLogin no
After you do this and save it (Ctrl+O then enter for nano) you’ll need to restart the sshd process with ‘/etc/init.d/sshd restart’. Now when you first login to SSH you’ll need to use a different username, then you can type in ‘su -‘, hit enter then type in your root password to switch to the root username if needed!