This is a very bad idea for servers on open internet. Only recommended for servers on local network that are behind firewall and SSH is not accessible from internet. To be used for testing only.
First install openssh server if not installed along with nano editor
sudo nano apt update
sudo nano apt upgrade
sudo apt install openssh-server nanoChange or set root user password
sudo passwdEdit the ssh config file:
sudo nano /etc/ssh/sshd_configFind the line that says:
#PermitRootLogin prohibit-passwordAnd change it to:
PermitRootLogin yesSave and exit using Ctrl+x followed by Y and then press Enter
Finally enable SSH during boot and restart it:
systemctl enable ssh
systemctl restart sshYou can check the IP address of the server by running the command:
ip addr