X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.7 required=5.0	tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Andrew Schulman <schulman.andrew@epamail.epa.gov>
Subject: Re: ssh and user env vars from control panel
Date: Wed, 02 Mar 2011 16:54:28 -0500
Lines: 16
Message-ID: <neatm697hv3p058mbrscpc282g2i0pkjc4@4ax.com>
References: <4D6DB62D.4050108@cpan.org> <4D6E9E11.3020507@cygwin.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Archive: encrypt
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

> > I generally set most of my environment variables in the System control
> > panel for my user, instead of in my .bashrc/.zshrc
> >
> > I noticed that when I log in to Cygwin via ssh, these environment
> > variables are not available.
> >
> > Would this be considered a misfeature?
> 
> No, it's considered a security feature.  The environment for OpenSSH is
> stripped to the basics so as to not let lots of information about the remote
> system slip through to the client.  If there's stuff you want in your OpenSSH
> session that you're not getting now, a small script that you can run after
> login is the prescribed solution.

You can also use the ~/.ssh/environment file, if the ssh server has
PermitUserEnvironment set to yes.  See ssh(1).


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

