Julius Posted September 22, 2019 Share Posted September 22, 2019 (edited) So far I've used the go script to overwrite /etc/ssh and /root dirs with my own keys and config for shell, and persistent .bash_history file and such, like so; # force overwrite root config to /root/ and etc/ssh and set permissions cp -af /boot/config/xroot/. /root/ cp -af /boot/config/xssh/. /etc/ssh/ chmod -R 0700 /root chmod 0600 /root/.ssh/* chmod 0644 /etc/ssh/* and then I manually rsync to update them from time to time, like so; rsync -qua --min-size=1 --no-specials --no-devices --no-links /root/* /boot/config/xroot rsync -qua --min-size=1 --no-specials --no-devices --no-links /etc/ssh/* /boot/config/xssh but that last bit I would like to be able to perform automagically at shutdown or reboot. Any good spot for this? Edited September 23, 2019 by Julius Quote Link to comment
Squid Posted September 22, 2019 Share Posted September 22, 2019 User scripts plugin. Schedule run at array stopping or array startingSent from my NSA monitored device 1 Quote Link to comment
Julius Posted September 23, 2019 Author Share Posted September 23, 2019 12 hours ago, Squid said: User scripts plugin. Schedule run at array stopping or array starting Sent from my NSA monitored device Yes, that will do, thanks! Regarding ssh, do you know if it's easy to change the code that keeps updating the /etc/ssh content after each restart of sshd? I mean, even that last bit of my previous post (updating the source that I use to overwrite the ssh) isn't fail-safe, because I found out the hard way that unRAID updated the keys without me knowing. If someone at unRAID core is reading; could you please make that an Advanced option? Something like "Leave /etc/ssh alone after initial ramdisk creation and sshd restarts [x]" would help us a lot. 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.