We do disable root login on the server from the ssh config file because of security reasons. So if you want to enable root login in ssh config., you must follow the below settings and you can allow users to ssh to root login.
How To Enable Root Login In SSH Config :
you can use the ssh key to log in the server then switch to root user. we don’t give the root user access to anyone but we can give server access using ssh key to log in.
By default, ssh installed on the machine. you can also change the ssh port number default 22 to another port number. All the server-side configuration needs to be changed in the sshd_config.
Step 1: Enable login in ssh config file
Step 2: Now enable password authentication for users.
Step 3: if u are still not able to login using root user, So add these lines in the sshd_config file.
Step 4: Restart the ssh service to take the effects.
systemctl restart sshd
You’re done. ssh allow root login allow user to ssh