Preserving root user authorized_keys file.
-
Hello all. I'm attempting to write a few scripts for my network to perform basic tasks like shutting all of the gear in my lab down at the same time. I am having a hell of a time facilitating this with my pfsense box, however.
My script is simple, it just issues "shutdown -p now" over ssh from my linux box. Ideally, the script will not ask for a password.
I am unable to specify an RSA key for the root user using the web interface on pfsense, as it only has the default "admin" user (who doesnt have system permissions to shut down the machine)
I am unable to just "cat id_rsa.pub >> ~/.ssh/authorized_keys" like every other *nix box, because the file is not preserved after a reboot.
I need a way to either specify the root user's public key for ssh using the web interface, or a place on the system that I can place my authorized_keys file that will be persistent after reboots of the machine.
Any assistance in this matter would be a godsend, but please, spare me the "its a bad idea to do this wit the root user" spheel. This is a test environment and the pfsense box itself is located behind another NAT already so it not realistically feasible to get to the system from outside my test network.
Thanks,
Will -
What version of pfSense are you using?
-
@Cry:
What version of pfSense are you using?
2.0 RC1
-
The root user is the admin user. Set the key for the admin user in the GUI, it works for root.
FYI: root and user share the same uid and home directory, they just have different shells.