1. Login to the system via regular user account.
2. Set password to root account (Due to root password is empty by default)
sudo passwd root3. To modify the configuration file of sshd_config (Marked PermitRootLogin prohibit-password, and added PermitRootLogin yes )
sudo vi /etc/ssh/sshd_config
# Authentication:
LoginGraceTime 120
#PermitRootLogin prohibit-password
PermitRootLogin yes
StrictModes yes
4. Restart sshd
sudo systemctl restart ssh
Done.
No comments:
Post a Comment