[Top][All Lists]

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

Re: .bashrc is not sourced after ssh -t (but is sourced if -t isn't used

From: Chet Ramey
Subject: Re: .bashrc is not sourced after ssh -t (but is sourced if -t isn't used)
Date: Tue, 04 Dec 2007 22:56:21 -0500
User-agent: Thunderbird (Macintosh/20071031)

Vincent Lefevre wrote:
> The following has been tried on OpenSUSE 10.2 and Mac OS X 10.4.11.
> When run by sshd, bash doesn't behave consistently:
>   1. bash sources the init files when one uses "ssh <host> <cmd>".
>   2. bash doesn't do that when one uses "ssh -t <host> <cmd>".

Bash does 1 if (and only if) it can detect it's being run with its
stdin connected to a socket.  `ssh -t' intentionally defeats that.
There is other checking that SSH_SOURCE_BASHRC enables: looking for


``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

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