• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Preserving root user authorized_keys file.

Scheduled Pinned Locked Moved General pfSense Questions
4 Posts 3 Posters 4.1k Views
Loading More Posts
  • 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.
  • P
    pentiumone133
    last edited by Apr 17, 2011, 5:21 AM

    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

    1 Reply Last reply Reply Quote 0
    • C
      Cry Havok
      last edited by Apr 17, 2011, 3:26 PM

      What version of pfSense are you using?

      1 Reply Last reply Reply Quote 0
      • P
        pentiumone133
        last edited by Apr 18, 2011, 3:08 PM

        @Cry:

        What version of pfSense are you using?

        2.0 RC1

        1 Reply Last reply Reply Quote 0
        • J
          jimp Rebel Alliance Developer Netgate
          last edited by Apr 18, 2011, 7:58 PM

          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.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          3 out of 4
          • First post
            3/4
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received