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 535 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

      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
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        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 Reply Quote 2
        • F
          furom @jimp
          last edited by

          @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
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.