Using bash over ssh

bootedbear

JavaJunkie
OK, I've long ago set things up so that I login to the bash shell when I launch a Terminal window.

However, I'd like to also drop into bash when I ssh to the system.

Currently, I enter:
bash
source .bash_profile

after logging in through ssh, but I'd rather automate it.

Any clues?

thanks,
bear
 
Go to Netinf Manager, select Users, then your user id. Set the "shell" paramater to "/bin/bash".
I think that will work but I have no way of checking right now.
 
Adding /bin/bash to the ~/.login file will effectively start 2 shells: tcsh (which is probably what you already have, being the default) then tcsh will load bash. That's inefficient.

Changing it in NetInfo will work, it's how you should do it. Here's how to do it from the Terminal since it is the Darwin forum after all...

Go into the terminal and type:
sudo niutil -createprop . /users/bootedbear shell /bin/bash

This will change your NetInfo user's property to use the /bin/bash shell from now on.

Verify it with
niutil -read . /users/bootedbear | grep shell

Replace "bootedbear" with whatever your username is.

For the changes to take effect you've also got to issue an
niutil -resync .
 
Back
Top