Hello everyone.

I have been interested in starting to self-host, and I have just been able to set up the first useful thing for myself (apart from a PiHole that I have running).

Since I am very afraid of making security mistakes, I would like to get feedback from you if my setup is secure or not.

The simple use case: I want to be able to back up files from my main computer to a hard disk, without having the hard disk attached to my main computer.

The setup:

  • A Raspberry Pi 4 running Raspberry Pi OS Lite (64-bit).
  • The Raspberry Pi can only be accessed via ed25519 key.
  • I configured a firewall on the Raspberry Pi with ufw to allow only traffic from the local subnet.
  • I then use sshfs to mount the hard disk connected with the Raspberry Pi to my main computer.
  • I plan to use rsync to back up my files.

Now I need your help: how secure is this setup? Did I make any major mistake? Is there something I could do better?

I’d be happy to get some feedback… 🙂

  • Pika@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    17
    ·
    edit-2
    5 hours ago

    is there any reason in particular that you are using both SSHFS and rsync? Rsync supports sftp which runs over an ssh connection via rsync -e ssh source dstUser@dstHost:/path

    if you are only using the sshfs system to allow a local ssh directory on your system to use with rsync, you could likely skip that entire part and just use rsync.

    LinuxConfig.org has a pretty decent page on it

      • irmadlad@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        2 hours ago

        We were/are all noobs at something at some point in our lives. I’ve had a computer in front of me since the mid 70’s, and I’m still a noob. Learning is one of the bigger draws to this whole scene to me. There is always room to learn, because there are always different approaches to the same problem.

      • Pika@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        9
        ·
        edit-2
        4 hours ago

        hey everyone gotta learns somewhere, and defo don’t expect you’ll ever stop learning on this adventure. That’s part of what makes this hobby fun!

        • 712@discuss.tchncs.deOP
          link
          fedilink
          English
          arrow-up
          4
          arrow-down
          1
          ·
          4 hours ago

          Wow, I just used this tutorial. rsync is amazing, and this actually makes everything so much easier. Thanks for pointing me in the right direction!

          • Pika@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            3
            ·
            edit-2
            3 hours ago

            you’re welcome, glad it worked for your use case.

            Rsync is an insane tool when you look at it, half the flags you wouldn’t even know existed unless you were looking for them.