Blog

12/08/2019

Enable Root Login via SSH



By default SSH comes configured in a way that disables root user logins. This is done as a security precaution and means that you cannot directly login as the root user over SSH. However you can usually get around the need for root ssh login by using the sudo command. In some cases though it’s just more convenient to get directly logged in as root.

Enable root login over SSH

  1. As the root user, edit the sshd_config file found in /etc/ssh/sshd_config:
    vim /etc/ssh/sshd_configFor details on working with Vim check out our article here!
  2. 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.
    PermitRootLogin yes
  3. Save and exit the file.
  4. Restart the SSH server:
    systemctl restart sshdOr:
    service sshd restart

And that’s it! With the new line added and the SSH server restarted you can now connect via the root user. In this instance you’re gonna be able to login with the root user with either the password or an ssh key.

For extra security you can set the value to `without-password` instead of  yes. So you would paste in the following in step 2 instead:
PermitRootLogin without-password
This process should work on pretty much any Linux based server with the ssh server installed. If you are using a cPanel server though you can easily control this setting from the WHM interface. In these cases it’s recommended to control this setting from your control panel interface.

14/08/2019

How to KVM, QEMU start or stop virtual machine from command line (CLI)

KVM or Kernel Based Virtual Machine is a popular virtualization technology. It allows you to run virtual guest machines over a host machine. To start...
14/08/2019

How to Docker backup Saving and restoring your volumes

Running a Docker volume backup First, we spin up a temporary container, and we mount the backup folder and the target Docker volume to this container....
12/08/2019

How to Start and Enable Firewalld on CentOS 7

In this article, we discuss how to start and enable firewalld. It is highly recommended that you have a firewall protecting your server.Pre-Flight CheckThese...