Ubuntu enable SSH for root user
Danger
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.
Install openssh-server
First install openssh server if not installed along with nano editor
1 2 3 | |
Set root password
Change or set root user password
1 | |
Enable root user login
Edit the ssh config file:
1 | |
Find the line that says:
1 | |
And change it to:
1 | |
Save and exit using Ctrl+x followed by Y and then press Enter
Finally enable SSH during boot and restart it:
1 2 | |
You can check the IP address of the server by running the command:
1 | |