Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Cannot mount Hetzner storage box for backups using SSHFS

Cannot mount Hetzner storage box for backups using SSHFS

Scheduled Pinned Locked Moved Solved Support
hetznersshfsstoragebox
33 Posts 10 Posters 11.0k Views 11 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    boydaihungst
    wrote on last edited by
    #20

    For me. It's silly. All the guide is out of date. With new created storage box, there isn't sub dir and ssh pub key is not yet allowed in storage box and storage box's pub isn't in my pc known_hosts, I have to add my pub key to storage and run sshfs command once time to get pub key of storage box. So because of new user without subdirectory, the "remote dir path" after colon should be RELATIVE path or empty "" in this case not "/". uxxxxxx@uxxxxxx.your-storagebox.de: /mnt/local/mount/path -o port=23,IdentifyFile=/home/username/.ssh/id_rsa ....

    1 Reply Last reply
    1
    • J joseph referenced this topic on
    • SansGuidonS Offline
      SansGuidonS Offline
      SansGuidon
      wrote on last edited by
      #21

      Hey folks
      I recently struggled a bit with those steps as well, but it was because I had set a passphrase for my SSH keys at creation time and Cloudron does not prompt for that anywhere.
      Is that in the plans for the future @girish ?

      Thanks !

      About me / Now

      1 Reply Last reply
      0
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #22

        @SansGuidon how would automatic mounting on boot work if the ssh key had a passphrase? If you put the password in clear text in a config file, it's probably more insecure than having no password at all (especially if you reuse passwords or a part of it...).

        jdaviescoatesJ 1 Reply Last reply
        0
        • SansGuidonS Offline
          SansGuidonS Offline
          SansGuidon
          wrote on last edited by SansGuidon
          #23

          @girish it could be an option to do it manually the first time for security reasons, with login keyring asked once.
          I mean I'd like that the option is at least given 🙂 , and of course not hardcoding the passphrase in the form.

          About me / Now

          1 Reply Last reply
          2
          • girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #24

            @SansGuidon yeah, maybe. Have to investigate 🙂 Feel free to open a thread in https://forum.cloudron.io/category/97/feature-requests and we can see how much interest is there.

            1 Reply Last reply
            1
            • girishG girish

              @SansGuidon how would automatic mounting on boot work if the ssh key had a passphrase? If you put the password in clear text in a config file, it's probably more insecure than having no password at all (especially if you reuse passwords or a part of it...).

              jdaviescoatesJ Offline
              jdaviescoatesJ Offline
              jdaviescoates
              wrote on last edited by jdaviescoates
              #25

              @girish said in Cannot mount Hetzner storage box for backups using SSHFS:

              @SansGuidon how would automatic mounting on boot work if the ssh key had a passphrase?

              It wouldn't. But I've got the same problem.

              I've already got a pair of SSH keys (with a passphrase) that I can successfully use to login to both my Storage Box and my VPS.

              But of course this doesn't work for the Backup set-up because it requires a passphrase.

              So, how can I create an additional set of non-passphrase keys just for use with the Storage Box?

              Thanks!

              I use Cloudron with Gandi & Hetzner

              1 Reply Last reply
              1
              • nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote on last edited by
                #26

                You should be able to follow the docs at https://docs.hetzner.com/storage/storage-box/backup-space-ssh-keys for generating and using new keys.

                jdaviescoatesJ 1 Reply Last reply
                0
                • nebulonN nebulon

                  You should be able to follow the docs at https://docs.hetzner.com/storage/storage-box/backup-space-ssh-keys for generating and using new keys.

                  jdaviescoatesJ Offline
                  jdaviescoatesJ Offline
                  jdaviescoates
                  wrote on last edited by jdaviescoates
                  #27

                  @nebulon thanks but those Hetzner docs just aren't clear nor detailed enough and having read them lots of times I'm still none the wiser.

                  It says:

                  Warning: With the default settings, using ssh-keygen will overwrite an existing SSH key! As an alternative, with the parameter -f, you can specify a different file path.

                  But that just isn't enough detail for me.

                  It isn't at all clear about how to create/ add an additional pair of ssh-keys whilst keeping the existing ones intact.

                  I use Cloudron with Gandi & Hetzner

                  jdaviescoatesJ 1 Reply Last reply
                  0
                  • nebulonN Offline
                    nebulonN Offline
                    nebulon
                    Staff
                    wrote on last edited by nebulon
                    #28

                    So you would create a new key pair with ssh-keygen -f ./newkey at least on linux. When prompted for a password, just press enter. Then you have the keypair in the current working directory where you ran that command.

                    From there you can upload the public portion of the key as mentioned in the hetzner docs and use the private key for your Cloudron configs.

                    jdaviescoatesJ 1 Reply Last reply
                    1
                    • jdaviescoatesJ jdaviescoates

                      @nebulon thanks but those Hetzner docs just aren't clear nor detailed enough and having read them lots of times I'm still none the wiser.

                      It says:

                      Warning: With the default settings, using ssh-keygen will overwrite an existing SSH key! As an alternative, with the parameter -f, you can specify a different file path.

                      But that just isn't enough detail for me.

                      It isn't at all clear about how to create/ add an additional pair of ssh-keys whilst keeping the existing ones intact.

                      jdaviescoatesJ Offline
                      jdaviescoatesJ Offline
                      jdaviescoates
                      wrote on last edited by jdaviescoates
                      #29

                      @jdaviescoates said in Cannot mount Hetzner storage box for backups using SSHFS:

                      It says:

                      Warning: With the default settings, using ssh-keygen will overwrite an existing SSH key! As an alternative, with the parameter -f, you can specify a different file path.
                      

                      But that just isn't enough detail for me.

                      It isn't at all clear about how to create/ add an additional pair of ssh-keys whilst keeping the existing ones intact.

                      OK, I had a play around and I've managed to do it:

                      On my local machine I did this:

                      ssh-keygen -f /home/josef/.ssh-storage/id_rsa
                      Generating public/private rsa key pair.
                      Enter passphrase (empty for no passphrase): 
                      Enter same passphrase again: 
                      Your identification has been saved in /home/josef/.ssh-storage/id_rsa
                      Your public key has been saved in /home/josef/.ssh-storage/id_rsa.pub
                      

                      Then I copied the public key i.e. ~/.ssh-storage/id_rsa.pub up to my Hetzner Storage Box by doing this:

                      cat ~/.ssh-storage/id_rsa.pub | ssh -p23 uxxxxxx@uxxxxxx.your-storagebox.de install-ssh-key
                      uxxxxxx@uxxxxxx.your-storagebox.de's password: 
                      Key No. 1 (ssh-rsa josef@josef-ThinkPad-T510) was installed in RFC4716 format
                      Key No. 1 (ssh-rsa josef@josef-ThinkPad-T510) was installed in OpenSSH format
                      
                      

                      Then I copied the contents of the private key i.e. ~/.ssh-storage/id_rsa into the private key box in the Cloudron backup configuration:

                      Screenshot from 2024-10-31 10-35-45.png

                      And then it worked - hooray!

                      I use Cloudron with Gandi & Hetzner

                      1 Reply Last reply
                      0
                      • nebulonN nebulon

                        So you would create a new key pair with ssh-keygen -f ./newkey at least on linux. When prompted for a password, just press enter. Then you have the keypair in the current working directory where you ran that command.

                        From there you can upload the public portion of the key as mentioned in the hetzner docs and use the private key for your Cloudron configs.

                        jdaviescoatesJ Offline
                        jdaviescoatesJ Offline
                        jdaviescoates
                        wrote on last edited by
                        #30

                        @nebulon thanks. This was on a new Cloudron that still had default file system backups at /var/backups - now I've got this set-up and working OK I guess I can now completely delete that backups folder?

                        I use Cloudron with Gandi & Hetzner

                        1 Reply Last reply
                        0
                        • nebulonN Offline
                          nebulonN Offline
                          nebulon
                          Staff
                          wrote on last edited by
                          #31

                          yes you can clear out the /var/backups folder

                          jdaviescoatesJ 1 Reply Last reply
                          1
                          • nebulonN nebulon

                            yes you can clear out the /var/backups folder

                            jdaviescoatesJ Offline
                            jdaviescoatesJ Offline
                            jdaviescoates
                            wrote on last edited by jdaviescoates
                            #32

                            @nebulon thanks, just to be doubly clear can I completely delete that /var/backups folder, or just delete it's contents? thanks!

                            I use Cloudron with Gandi & Hetzner

                            1 Reply Last reply
                            0
                            • nebulonN Offline
                              nebulonN Offline
                              nebulon
                              Staff
                              wrote on last edited by
                              #33

                              Just purge contents of the folder or delete the folder and recreate it with the same permissions. Other bits of Linux sometimes put logs there.

                              1 Reply Last reply
                              1
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Bookmarks
                              • Search