December 8, 20169 yr Hi, I searched, but couldn't find an answer to these questions: - are unRAID's SSH keys persisted across reboots and unRAID upgrades? - is unRAID's authorised_hosts persisted across reboots and unRAID upgrades? Essentially I use unRAID to rsync out to clients so I add unRAID's public key to the client's authorized-hosts. Likewise, I SSH into unRAID a far bit and copy my public key to unRAID's authorized-users and I want to ensure this will persist across reboots and upgrades. Any suggestions? Thanks!
December 8, 20169 yr Community Expert Hi, I searched, but couldn't find an answer to these questions: - are unRAID's SSH keys persisted across reboots and unRAID upgrades? - is unRAID's authorised_hosts persisted across reboots and unRAID upgrades? Essentially I use unRAID to rsync out to clients so I add unRAID's public key to the client's authorized-hosts. Likewise, I SSH into unRAID a far bit and copy my public key to unRAID's authorized-users and I want to ensure this will persist across reboots and upgrades. Any suggestions? Thanks! they should be. They are normally stored on the flash in the config/ssh folder and restored to their correct runtime location any time unRAID boots.
December 8, 20169 yr Author Thanks @itimpi. Anecdotally they seem to persist, but good to know it is by design. Thanks again.
December 8, 20169 yr Author Actually, it is a little more complicated because ssh really doesn't work well unless the keys are user read/write only. Unfortunately, extFat or Fat32 (I forget which) doesn't allow you to change them, so some hoops need to be jumped through. (self promotion) I hastily blogged about it at https://colinyates.co.uk/posts-output/2016-12-08-unraid-and-ssh-keys/. Upgrades and clarifications welcome.
December 9, 20169 yr Try this: http://lime-technology.com/forum/index.php?topic=52890.msg508295#msg508295 Edit: Oops, you also needed to keep your private keys persistent. A usable solution is to make a custom package for private keys # mkdir /boot/extra # mkdir /tmp/package-keys # cd /tmp/package-keys # mkdir root/.ssh # chmod 700 -r root # cp private.key root/.ssh/id_rsa # chmod 600 root/.ssh/id_rsa # mkpkg -c n -l y /boot/extra/sshmasterkey-0.1-noarch-1.txz # installpkg /boot/extra/sshmasterkey-0.1-noarch-1.txz the resulting archive is a valid slackware package that contains your masterkey and placing it inside /bootextra will auto install everytime unraid starts up the /tmp/package-keys dir can be deleted afterwards.
January 4, 20206 yr Old thread but I'm also looking to get a persistent private key across reboots/updates and this doesn't seem to work anymore, it says mkpkg isn't installed.
Archived
This topic is now archived and is closed to further replies.