# Backup between 2 servers over ssh with other user than root

**URL:** <https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829>\
**Category:** Linux on Servers\
**Created:** [April 23, 2024, 4:23am UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829 "2024-04-23T04:23:59Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Havouza15](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/h/e8c25b/32.png) [@Havouza15](https://community.learnlinux.tv/u/Havouza15)\
**Post date:** [April 23, 2024, 4:23am UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/1 "2024-04-23T04:23:59Z")

</div>

Hi! Probably newbi question but as selftaught Linux user this is something I cant find an answer for. I have 2 linux servers in the cloud, both webservers. I use webmin as CP. I use the built in backup function and backup each server to the other every night.  
But I want to disable the root user but when I try to login with another user it does not work. I backup over SSH

If this make sense can someone explain how I can get the server to accept the backup when the login user is not root

---

<div class="post-metadata">

**Author:** ![Avoca](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@Avoca](https://community.learnlinux.tv/u/Avoca)\
**Post date:** [April 23, 2024, 6:35am UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/2 "2024-04-23T06:35:32Z")

</div>

Try adding another user in Webmin settings and adjust admin privileges… maybe!

---

<div class="post-metadata">

**Author:** ![Havouza15](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/h/e8c25b/32.png) [@Havouza15](https://community.learnlinux.tv/u/Havouza15)\
**Post date:** [April 23, 2024, 11:21am UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/3 "2024-04-23T11:21:32Z")

</div>

Did not help. I have no problem to login to server 2 from server 1 using the terminal in the respective server CP. And the reverse also work without problem

---

<div class="post-metadata">

**Author:** ![ThatGuyB](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/thatguyb/32/784_2.png) [@ThatGuyB](https://community.learnlinux.tv/u/ThatGuyB)\
**Post date:** [April 23, 2024, 12:44pm UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/4 "2024-04-23T12:44:29Z")

</div>

> [@Havouza15](#):
>
> I use webmin as CP

CP, as in, control panel, not cPanel, right? Depending on what you are scp’ing / rsync’ing, then you will need to use root, or tar locally and then transfer to the other side, if you’re trying to keep the permissions the same.

What’s the error you’re getting? There should be something on the screen, like an output or something. Otherwise, if webmin has a log for the backup function, check it (never used webmin).

---

<div class="post-metadata">

**Author:** ![Havouza15](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/h/e8c25b/32.png) [@Havouza15](https://community.learnlinux.tv/u/Havouza15)\
**Post date:** [April 23, 2024, 12:57pm UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/5 "2024-04-23T12:57:44Z")

</div>

I use webmin so CP is webmin. I get permission denied so you can be right. Can I perhaps setup a keypair between the servers?

---

<div class="post-metadata">

**Author:** ![Avoca](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@Avoca](https://community.learnlinux.tv/u/Avoca)\
**Post date:** [April 23, 2024, 1:23pm UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/6 "2024-04-23T13:23:09Z")

</div>

Makes sense really. You wouldn’t want some wombat in a legacy SUDO Group with access to that much distructive power.

For what it’s worth, I have noticed I can’t reboot my server from the Webmin CLI via SSH without being _root_.

Watching with interest…

---

<div class="post-metadata">

**Author:** ![Havouza15](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/h/e8c25b/32.png) [@Havouza15](https://community.learnlinux.tv/u/Havouza15)\
**Post date:** [April 23, 2024, 1:39pm UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/7 "2024-04-23T13:39:31Z")

</div>

A short note off topic. I have realized that if I want to reboot the server I need to disable ufw first. If it is enabled the server never come online again. Then I must VNC to the server disable ufw and it comes online directly. Dionmt know if it is a bug

---

<div class="post-metadata">

**Author:** ![Avoca](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@Avoca](https://community.learnlinux.tv/u/Avoca)\
**Post date:** [April 23, 2024, 2:51pm UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/8 "2024-04-23T14:51:21Z")

</div>

No, UFW will block the SSH IP address unless it’s listed in the UFW config. file.

Actually, Jay has a good video on exactly this subject and shows the correct config. settings.

---

<div class="post-metadata">

**Author:** ![Havouza15](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/h/e8c25b/32.png) [@Havouza15](https://community.learnlinux.tv/u/Havouza15)\
**Post date:** [April 23, 2024, 2:59pm UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/9 "2024-04-23T14:59:24Z")

</div>

Ok, then I will find that video. The problem is that I dont have a fixed IP at home

---

<div class="post-metadata">

**Author:** ![Avoca](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@Avoca](https://community.learnlinux.tv/u/Avoca)\
**Post date:** [April 23, 2024, 6:05pm UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/10 "2024-04-23T18:05:59Z")

</div>

Neither do I. I use a 5G hotspot router and my ISP won’t issue one, which creates a problem.

One solution is to use a VPN and pay for a Static IP, but it’s super expensive.

The only other option I have to self-hosting a server with fixed, public facing, IP address is fibre, and even then its an extra monthly fee.

Maybe someone can suggest an alternative, but DHCP is my only affordable option where WAN is concerned.

UFW config. file’s for LAN IP networks are much simpler of course.

---

<div class="post-metadata">

**Author:** ![Havouza15](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/h/e8c25b/32.png) [@Havouza15](https://community.learnlinux.tv/u/Havouza15)\
**Post date:** [April 23, 2024, 6:20pm UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/11 "2024-04-23T18:20:09Z")

</div>

I will have to talk to the provider, a local guy. He has to give me a static IP once again. I had one for years, but then started to use keypairs for ssh so thought I had no use of it anymore. Its always a security risk to always have the same ip at home but I can handle that.

---

<div class="post-metadata">

**Author:** ![Avoca](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@Avoca](https://community.learnlinux.tv/u/Avoca)\
**Post date:** [April 23, 2024, 6:29pm UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/12 "2024-04-23T18:29:13Z")

</div>

Lucky you. Much easier to cater for fixed IP security than find a DHCP work-around.

---

<div class="post-metadata">

**Author:** ![Avoca](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@Avoca](https://community.learnlinux.tv/u/Avoca)\
**Post date:** [April 23, 2024, 11:11pm UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/13 "2024-04-23T23:11:02Z")

</div>

Just found this in Webmin, you may be able to solve your issue through here.

 ![Screenshot from 2024-04-24 09-08-30](https://community.learnlinux.tv/uploads/default/original/2X/9/9bc70ea79bafe90a3f1729fdb520a223ae9078e7.png)

---

<div class="post-metadata">

**Author:** ![ThatGuyB](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/thatguyb/32/784_2.png) [@ThatGuyB](https://community.learnlinux.tv/u/ThatGuyB)\
**Post date:** [April 24, 2024, 12:52am UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/14 "2024-04-24T00:52:55Z")

</div>

That option there is setting the `PermitRootLogin` option in sshd\_config. Default is key-only (`prohibit-password` option), yes means password authentication is allowed (`yes`), no is no root login permitted (`no`) and “only for commands” is allowing root with a password or key for specified commands only (`forced-commands-only` option), like zfs-receive for example.

The problem here is that the user is unable to log in. I suspect the backup tool might be asking for a password and the user can’t insert it. So OP might need to add a user SSH key to ~/.ssh/authorized\_keys. At least that’s my guess.

---

<div class="post-metadata">

**Author:** ![Avoca](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@Avoca](https://community.learnlinux.tv/u/Avoca)\
**Post date:** [April 24, 2024, 1:05am UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/15 "2024-04-24T01:05:42Z")

</div>

Yeah, I figured there’d be a twist to it… cheers.

---

<div class="post-metadata">

**Author:** ![Havouza15](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/h/e8c25b/32.png) [@Havouza15](https://community.learnlinux.tv/u/Havouza15)\
**Post date:** [May 3, 2024, 9:25am UTC](https://community.learnlinux.tv/t/backup-between-2-servers-over-ssh-with-other-user-than-root/3829/16 "2024-05-03T09:25:24Z")

</div>

I created a keypair on each server and fixed it that way. Even more secure, now I can disable root login and password

Thanks all
