Search code examples
linuxbashshellpfsense

automatic input in bash pfsense shell to get access to true shell


I am confronted with a problem, where I have to automate a task to run a script in pfsense shell, but every time I login in remotely in pfsense I am presented with menu to choose from i.e. to enter shell I have to press 8 every time order to get access to shell and run script there. Is there any way to skip that 8 pressing part and get directly the shell to work on or any other way in a shell/bash script that automatically presses 8, and I get shell directly. Screenshots are below:

enter image description here

This is the shell I get when I login remotely, you can clearly see that I have to press 8 for getting into the shell

enter image description here

See that after pressing 8, I got access to shell where I can run actual commands. Any help will be appreciated.


Solution

  • This only happens when you log as root. Create another user and you'll log directly into shell. Note that pfSense's default shell is tcsh, not bash, but the Bourne shell is available if you run the command sh.