[CLUE-Tech] Login shell w/ SSH

Matt Gushee mgushee at havenrock.com
Tue Jan 14 22:13:45 MST 2003


On Tue, Jan 14, 2003 at 09:16:48PM -0700, Jeffery Cann wrote:
> On Tuesday 14 January 2003 05:07 pm, Matt Gushee wrote:
> > What do I need to do to have .bashrc invoked when I log in over SSH?
> 
> Rename it or create a soft link to a file called ~/.bash_profile.  AFAIK, 
> .bashrc will not be run as a login shell.  I use this setup successfully via 
> ssh.

Well, kind of. But aren't .bashrc and .bash_profile supposed to do
different things? Admittedly, it has never been totally clear to me what
exactly the distinction is supposed to be, but I have always had both.

Anyway, you prompted me to look at the .bash_profile that was already
there, and I found:

#if [ -f ~/.bashrc ]; then
#    source ~/.bashrc
#fi

Aha! Commented out! Apparently it was installed that way, though I'm not
sure why. And for some reason it seems kind of backwards to have
.bash_profile invoke .bashrc ... I guess the names suggest that .bashrc
is "more active."

Well, thanks for the suggestion. I'm not doing what you said (never!
that would be too simple!) but you pointed me in the right direction.

-- 
Matt Gushee                 When a nation follows the Way,
Englewood, Colorado, USA    Horses bear manure through
mgushee at havenrock.com           its fields;
http://www.havenrock.com/   When a nation ignores the Way,
                            Horses bear soldiers through
                                its streets.
                                
                            --Lao Tzu (Peter Merel, trans.)



More information about the clue-tech mailing list