sshd and AcceptEnv setting | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

sshd and AcceptEnv setting

Solaris


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-04-2010
RobertFord RobertFord is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 30 September 2010, 4:47 AM EDT
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
sshd and AcceptEnv setting

Hello,
On Linux the /etc/ssh/sshd_config has the "AcceptEnv" parameter which allows to "push" environment setting to a ssh session. For example, when I set in sshd_conf

Code:
AcceptEnv BLAH

I can then ssh to the server using:


Code:
user@client~$ export BLAH=hello
user@client~$ ssh server -o SendEnv=BLA

H

and the result is

Code:
user@server~$ echo $BLAH
hello

My question is how can I do this on Solaris. The sshd_config does not accept this parameter.

I found out that on Solaris there is the "PermitUserEnvironment yes" setting which allows to export variables that are on the server in the ~/.ssh/environment file.

This does not solve my problem because I want the client to be able to set the env variable before the connection.

Thanks,

R.F.
Sponsored Links
    #2  
Old 03-20-2010
ckmehta ckmehta is offline
Registered User
 
Join Date: Feb 2008
Last Activity: 4 September 2014, 7:53 PM EDT
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
3 mutually-exclusive suggestions
1. Switching from Sun's SSH to a truly current and regularly updated OpenSSH based on a set of packages provided by CSW packaging home or Blastwave.org - An OpenSolaris Community Site, I prefer the former. You can keep most, if not all, of the Sun SSH settings you have sshd_config & ssh_config, but now you have the option of newer features/settings to use and will likely have better compatibility and synchronicity with Linux-based SSH servers.
2. Depending on what you are running on the remote server side, you can set an environment as part of your command sequence, based on your target shell
ssh user@sshServer "setenv myVarName myVarValue; /usr/bin/tcsh"
3. Write a script that creates an "export file" of variables you want imported on the remote shell, copy them with SCP to a standard location. Setup your environment shell file to source the copied export file if the $SSH_CONNECTION and $SSH_CLIENT variables are set in some fashion (as specific as you'd want to get). Then SSH as normal. Obviously this works a lot better if you are using public/private key authentication to avoid the double password prompt.
Sponsored Links
    #3  
Old 03-26-2010
RobertFord RobertFord is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 30 September 2010, 4:47 AM EDT
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
ok thanks
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
no sshd log hezry79 Solaris 5 04-01-2009 10:04 AM
SSHD does not start untamed AIX 31 01-10-2008 11:13 AM
It helps in the sshd on sshd.log sandba AIX 0 07-28-2006 09:39 PM
sshd restart ashterix AIX 2 11-28-2005 10:50 AM
sshd norsk hedensk UNIX for Dummies Questions & Answers 2 10-10-2002 12:08 PM



All times are GMT -4. The time now is 12:41 PM.