p:: CLI
root user
sudo suSet root password
passwdNew password:
Retype new password:
passwd: password updated successfullyEnable root login over SSH
vim /etc/ssh/sshd_configAdd below lines to end of file
PermitRootLogin yes
PasswordAuthentication yesSave file and Restart SSH Server
systemctl restart sshdCopy Public Key to your laptop using ssh-copy-id
ssh-copy-id [email protected]/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
[email protected]'s password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh '[email protected]'"
and check to make sure that only the key(s) you wanted were added.ssh [email protected]Disable Password Authentication
vim /etc/ssh/sshd_configChange below values
PermitRootLogin prohibit-password
PasswordAuthentication no
Save file and Restart SSH Server
systemctl restart sshd