Sometimes for any reason you want to enable root ssh using any SSH Client such as putty and only the administrator can login to do this follow the below steps :-
- vi /etc/ssh/sshd_config
- search for line as follow :-
- PermitRootLogin yes and change it to –> PermitRootLogin no
- Search for the following lines as well :-
- DenyUsers root user2 user3
- Remove the root from Deny User
- /etc/init.d/sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
If you want to disable the SSH login for root just keep everything like the above.
Published by Osama Mustafa
Osama considered as one of the leaders in Cloud technology, DevOps and database in the Middle-East. I have more than ten years of experience within the industry. moreover, certfied 4x AWS , 4x Azure and 6x OCI, have also obtained database certifications for multiple providers.
In addition to having experience with Oracle database and Oracle products, such as middle-ware, OID, OAM and OIM, I have gained substantial knowledge with different databases.
Currently, I am architecting and implementing Cloud and DevOps. On top of that, I'm providing solutions for companies that allow them to implement the solutions and to follow the best practices.
View all posts by Osama Mustafa