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

Change default SSH shell?

Scheduled Pinned Locked Moved General pfSense Questions
3 Posts 2 Posters 463 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.
  • F
    furom
    last edited by May 19, 2023, 10:46 AM

    Hi,

    when I ssh to my box I get a tcsh as user, and sh as root. Can I redefine this somehow? I tried to change this in /etc/passwd, but didn't do anything. Would such change impact on functionality or just a matter of taste?

    Thanks

    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by May 19, 2023, 3:42 PM

      While you can't change the default without affecting things like the menu, you can have ssh start whatever you want. There are not a lot of alternatives available, though. But there is bash which you can install via pkg install bash.

      Then SSH in with:

      $ ssh root@x.x.x.x -t bash
      

      Be aware if you try to use bash -l it will end up going right into the menu if you use root or admin. As a regular non-root user that should be OK.

      Alternately, consider either having it run your preferred shell at the end of the tcsh .tcshrc or even patching the menu file (/etc/rc.initial) to run it directly for option 8.

      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!

      F 1 Reply Last reply May 19, 2023, 5:42 PM Reply Quote 2
      • F
        furom @jimp
        last edited by May 19, 2023, 5:42 PM

        @jimp said in Change default SSH shell?:

        While you can't change the default without affecting things like the menu, you can have ssh start whatever you want. There are not a lot of alternatives available, though. But there is bash which you can install via pkg install bash.

        Then SSH in with:

        $ ssh root@x.x.x.x -t bash
        

        Be aware if you try to use bash -l it will end up going right into the menu if you use root or admin. As a regular non-root user that should be OK.

        Alternately, consider either having it run your preferred shell at the end of the tcsh .tcshrc or even patching the menu file (/etc/rc.initial) to run it directly for option 8.

        Thanks! Well, there were a few options, and I think loading it from .tcshrc sounds like the best option, least intrusive :) I'll give it a go!

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