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

    SSH auto script

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 2 Posters 733 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.
    • C
      CC
      last edited by

      So we are locking SSH down to keyed only accounts, multiple admins mean multiple keys, means multiple users; right now when you log into SSH on any account other then admin you don't get the menu (mostly used for  "16 - Restart PHP-FPM" when the GUI decides to not play any more).

      Is there any way of running a script on SSH login to run "sudo /etc/rc.initial" (the sudo part works fine, just want it to run it when users login)

      I've tried the usual linuxy things like .profile and  .bashrc

      Can anyone help please?

      1 Reply Last reply Reply Quote 0
      • C
        CC
        last edited by

        Sorry to bump but can anyone help?

        1 Reply Last reply Reply Quote 0
        • H
          heper
          last edited by

          check .profile  and .shrc in the root directory.

          copying those to the other users might do the trick

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.