bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

why ~/.bashrc in ssh or scp??


From: Stephane Chazelas
Subject: why ~/.bashrc in ssh or scp??
Date: Fri, 14 Jan 2005 15:47:42 +0000
User-agent: Mutt/1.5.6i

I find bash policy about startup files a bit confusing. I've
never quite understood why login shells wouldn't read the
~/.bashrc file (I would have considered this file as in other
shells or even other programs as the customization file, so why
not applying customizations to the login shells?).

I've just discovered that the shells run with -c 'command line'
within a ssh or rsh non-interactive session were reading the
~/.bashrc. This left me very perplex.

Someone suggested that it might be so that:

in

local-shell$ ssh some-host
remote-shell$ some shell command line
remote-shell$ exit
local-shell$

and in

ssh some-host 'some shell command line'

The "some shell command line" is interpreted the same way.

But that's not even true as in the first case the
~/.(bash_)profile is read and not the ~/.bashrc (and bash is
interactive (with aliases activated for instance)).

What would be the reason, then?

And shouldn't it be limited to the bash instances run by sshd or
rshd and not every bash instance started during the session?

Also, why should the behavior be different in "rsh" and in "rsh
-n"?

regards,
St├ęphane





reply via email to

[Prev in Thread] Current Thread [Next in Thread]