- To disable root login, open the main ssh configuration file /etc/ssh/sshd_config with your choice of editor.
- # vi /etc/ssh/sshd_config
- Search for the following line in the file.
- #PermitRootLogin no
- Remove the ‘#‘ from the beginning of the line. Make the line look like similar to this.
- PermitRootLogin no
- Next, we need to restart the SSH daemon service.
- # /etc/init.d/sshd restart
- Now try to login with root user, you will get “Access Denied” error.
- So, from now onwards login as normal user and then use ‘su’ command to switch to root user.
How to disable SSH login for the root user? Print
- 0
Was this answer helpful?
Related Articles
How to Create Full backup for an account visa SSH
CPanel: Backup and Restore a Domain Account via SSHPlease Rate us Sometimes there is a need...
How create a backup of a MySQL database using SSH
Please Rate us
Log into your account on our server and issue the following command:...
mysql user with the name already exists. how to delete
Please Rate us Solving an issue of
Extracting tarball................... DoneExtracting...
Optimize and repair all mysql databases at once
There is a really handy MySql utility called mysqlcheck that allows you to do a number of...
How to install OpenVPN on Linux?
apt-get install openvpn openssl udev ...