coliny Posted December 8, 2016 Share Posted December 8, 2016 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! Quote Link to comment
itimpi Posted December 8, 2016 Share Posted December 8, 2016 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. Quote Link to comment
coliny Posted December 8, 2016 Author Share Posted December 8, 2016 Thanks @itimpi. Anecdotally they seem to persist, but good to know it is by design. Thanks again. Quote Link to comment
coliny Posted December 8, 2016 Author Share Posted December 8, 2016 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. Quote Link to comment
ken-ji Posted December 9, 2016 Share Posted December 9, 2016 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. Quote Link to comment
coliny Posted December 9, 2016 Author Share Posted December 9, 2016 Thanks Kenji - that's much more elegant - thanks. Quote Link to comment
dnLL Posted January 4, 2020 Share Posted January 4, 2020 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.