Enable SSH root login on Ubuntu 16.04 Xenial Xerus Linux Server/Desktop
By default the root's ssh remote shell access is denied by default. Any attempt to remote login as root will result in
Permission denied message:$ ssh root@10.0.0.55 root@10.0.0.55's password: Permission denied, please try again. root@10.0.0.55's password:In order to enable root ssh login on Ubuntu 16.04 Xenial Xerus Linux run the following command:
$ sudo sed -i 's/prohibit-password/yes/' /etc/ssh/sshd_configor manually open sshd configuration file
/etc/ssh/sshd_config and change line:FROM: PermitRootLogin prohibit-password TO: PermitRootLogin yesOnce you have made the above configuration change restart ssh daemon:
$ sudo systemctl restart sshdAfter you restart sshd daemon you will be able to remotely login as a root user:
$ ssh root@10.0.0.55 root@10.0.0.55's password: Welcome to Ubuntu 16.04 LTS (GNU/Linux 4.4.0-22-generic x86_64) * Documentation: https://help.ubuntu.com/ 22 packages can be updated. 20 updates are security updates. The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
How To Install Webmin on Ubuntu 16.04
Introduction
Prerequisites
- One Ubuntu 16.04 server set up by following the Ubuntu 16.04 initial server setup guide, including a sudo non-root user and a firewall.
- Apache installed by following How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04. We'll use Apache to perform Let's Encrypt's domain verification.
- A Fully-Qualified Domain Name (FQDN), with a DNS A record pointing to the IP address of your server. To configure this, follow the tutorial How To Set Up a Host Name with DigitalOcean.
Step 1 — Installing Webmin
/etc/apt/sources.list file.
- sudo nano /etc/apt/sources.list
. . .
deb http://download.webmin.com/download/repository sarge contrib
- wget http://www.webmin.com/jcameron-key.asc
- sudo apt-key add jcameron-key.asc
- sudo apt-get update
- sudo apt-get install webmin
Output
Webmin install complete. You can now login to
https://your_server_ip:10000 as root with your
root password, or as any user who can use `sudo`.
ufw during the prerequisite step, you will need to run the command sudo ufw allow 10000 in order to allow Webmin through the firewall. For extra security, you may want to configure your firewall to only allow access to this port from certain IP ranges.Step 2 — Adding a Valid Certificate with Let's Encrypt
https://your_domain:10000 in your web browser, replacing your_domain with the domain name you pointed at your server.

/var/www/html, which is the folder that the Apache web server you configured in the prerequisites uses. Follow these steps to set up your certificate:- Fill in Hostnames for certificate with your FQDN.
- For Website root directory for validation file, select the Other Directory button and enter
/var/www/html. - For Months between automatic renewal section, deselect the Only renew manually option by typing
1into the input box, and selecting the radio button to the left of the input box. - Click the Request Certificate button. After a few seconds, you will see a confirmation screen.
Step 3 – Using Webmin
Managing Users and Groups
- Fill in Username with
deploy. - Select Automatic for User ID.
- Fill in Real Name with a descriptive name like
Deployment user. - For Home Directory, select Automatic.
- For Shell, select /bin/bash from the dropdown list.
- For Password, select Normal Password and type in a password of your choice.
- For Primary Group, select New group with same name as user.
- For Secondary Group, select sudo from the All groups list, and press the -> button to add the group to the in groups list.
- Press Create to create this new user.
Updating Packages

