Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com From: Pekka Niiranen Subject: Re: .bashrc not called for non-interactive ssh sessions: SOLUTION Date: Fri, 22 Oct 2004 15:55:22 +0300 Lines: 74 Message-ID: References: <4d211735041021164839ba2ac3 AT mail DOT gmail DOT com> <6 DOT 1 DOT 0 DOT 6 DOT 0 DOT 20041021203449 DOT 04ec5bb8 AT pop DOT prospeed DOT net> <4d211735041021183421fa60a3 AT mail DOT gmail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT org X-Gmane-NNTP-Posting-Host: b001.metso.com User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) In-Reply-To: <4d211735041021183421fa60a3@mail.gmail.com> X-IsSubscribed: yes Hi there, I solved similar problem by enabling line PermitUserEnvironment yes in /etc/sshd_config and copying my .bashrc as ~/.ssh/environment In man pages of sshd it says: " 6. Reads the file $HOME/.ssh/environment, if it exists, and users are allowed to change their environment. See the PermitUserEnvironment option in sshd_config(5).man sshd " -pekka- Philip Nemec wrote: > I'm not totally sure what you're asking... My shell in /etc/passwd is > /bin/bash. Just in case I copied the /etc/defaults/profile to > /etc/profile and added a check if that even gets called. > > /etc/profile *doesn't* get called with a non-interactive ssh which is > the correct behavior - only the users ~/.bashrc should be called. > > I reinstalled the service just in case there was something strange > there (like being set to allow service to interact with desktop) - but > still no luck... > > So if you put some echo command in your .bashrc and then run ssh > localhost pwd, you see it? > > On Thu, 21 Oct 2004 20:40:26 -0400, Larry Hall > wrote: > >>At 07:48 PM 10/21/2004, you wrote: >> >> >> >>>As best as I can tell from the archives and man pages, ~/.bashrc >>>should be called when starting an ssh session - both interactive and >>>non-interactive. Tests on my Linux box behave as expected: >>> >>>ssh linuxbox >>>ssh linuxbox pwd >>>ssh cygwinbox >>> >>>But ssh cygwinbox pwd does *not* call ~/.bashrc... >>> >>>>From the bash man page: >>> >>> Bash attempts to determine when it is being run by the remote shell >>> daemon, usually rshd. If bash determines it is being run by rshd, it >>> reads and executes commands from ~/.bashrc, if that file exists and is >>> readable. It will not do this if invoked as sh. The --norc option may >>> be used to inhibit this behavior, and the --rcfile option may be used >>> to force another file to be read, but rshd does not generally invoke >>> the shell with those options or allow them to be specified. >> >> >>WFM. What's your shell in '/etc/profile'? >> >>-- >>Larry Hall http://www.rfk.com >>RFK Partners, Inc. (508) 893-9779 - RFK Office >>838 Washington Street (508) 893-9889 - FAX >>Holliston, MA 01746 >> >> > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/