Enable Root Login via SSH In Ubuntu
Posted: 22 Nov 2019, 14:51
Enable root login over SSH
1. Login to your server as root.
2. As the root user, edit the sshd_config file found in:
3. Using VIM Editor:
4. Add the following line to the file, you can add it anywhere but it’s good practice to find the block about authentication and add it there.
5. Save and exit the file.
6. Restart the SSH server:
or
And that’s it! With the new line added and the SSH server restarted, you can now connect via the root user.
1. Login to your server as root.
2. As the root user, edit the sshd_config file found in:
Code: Select all
/etc/ssh/sshd_config:
Code: Select all
vim /etc/ssh/sshd_config
Code: Select all
PermitRootLogin yes
6. Restart the SSH server:
Code: Select all
systemctl restart sshd
Code: Select all
service sshd restart