On Tue, Nov 14, 2006 at 05:02:55AM -0800, davej wrote: > I have sshd running on a solaris system. Due to various reasons my user > accounts default shell is csh, but in my .cshrc profile I execute the bash > shell if it exists on the system. > It looks something like this > ------------------------------------ > if [ -e /usr/bin/bash ] > exec /usr/bin/bash > exit > fi > ------------------------------------
You should not be doing this in .cshrc. You should be doing it in .login. Since "ssh host" spawns a login shell, it will read both .cshrc and .login, which gives the result you desire. "ssh host date" will spawn a NON-login shell, which only reads .cshrc, and then runs the date command. (At least, if I remember my csh well enough.)
