scp not tolerant of extraneous shell messages

Bryan Henderson bryanh at giraffe-data.com
Thu Jul 4 06:21:29 EST 2002


>.bashrc is read by any invocation of bash.

Not according to the Bash user's guide or practice.  .bashrc is for
interactive non-login shells.  The file that runs for ALL Bash
invocations is the one whose name is in the environment variable
$BASH_ENV.

So: 

  - in .bash_login, you put your "good morning" type greetings.

  - in .bashrc you set up your prompt.

  - in ($ENV_BASH), you set PATH.


If Bash actually followed its own principles, scp would not have a
problem, because Bash would not run .bashrc.  It is only because the
rshd hack (wherein Bash apparently mistakes the scp session for an
interactive rsh session) makes Bash invoke .bashrc in a shell that is
not interactive that scp has a problem with conversational messages
from .bashrc.

-- 
Bryan Henderson                                    Phone 408-621-2000
San Jose, California



More information about the openssh-unix-dev mailing list