Skip to main content

Cannot perform a remote backup to a Debian target server due to disabled root SSH access

Unlocking SSH Under Root on Debian OS Target Server Via Terminal for Remote Backup

Problem

Cannot perform a remote backup to a Debian target server.

Debian has SSH access under root user disabled by default.

Solution

Enable SSH access under the root user.

  1. Access the terminal/console of the remote server.
  2. Run the following command to permit root login:
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
  1. Run the following command to restart the SSH service:
systemctl restart sshd.service

To re-secure the root account:

  1. Access the terminal/console of the remote server.
  2. Run the following command to permit root login:
   sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin no/g' /etc/ssh/sshd_config
  1. Run the following command to restart the SSH service:
   systemctl restart sshd.service

Was this article helpful?

More in Troubleshooting

Not finding what you are looking for?

Chat with us or send us an email. Chat is open 24/7 through the bubble at the bottom right.

Send us an email