Sponsored Content
Full Discussion: sshd and AcceptEnv setting
Operating Systems Solaris sshd and AcceptEnv setting Post 302400746 by RobertFord on Thursday 4th of March 2010 04:13:03 AM
Old 03-04-2010
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.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sshd

i just downloaded and installed succesfully openssh server, and am running it on netbsd 1.5, i can not login with anyuser, i enabled root login just to see what happens and i can login as root, but no other user, i checked my config and most things are default, whats going on? has any one else had... (2 Replies)
Discussion started by: norsk hedensk
2 Replies

2. AIX

sshd restart

need some clarification: if i ssh to the server & i restart the sshd process, did my connection gone? one more thing, there are a few sshd processes in aix, how do i restart it all to read new config? using HUP? thanks in advance! (2 Replies)
Discussion started by: ashterix
2 Replies

3. AIX

It helps in the sshd on sshd.log

Friends, I made the installation of the ssh in the it conspires, I configured in the ssh_config the following parameters.. SyslogFacility AUTH LogLevel INFO that should generate sshd.log in the /var/log.... more no this generating. Somebody could help myself in... (0 Replies)
Discussion started by: sandba
0 Replies

4. UNIX for Dummies Questions & Answers

sshd question

Can someone tell me the difference between the (2) listed below: oracle pts/1 ip1 May1 7:11 9:11 oracle sshd ip1 May1 7:11 8:22 How do I read the above information, the fact that the row for pts/1 has a longer time duration than the row for sshd. Why is the... (2 Replies)
Discussion started by: banyan
2 Replies

5. AIX

SSHD does not start

I installed OpenSSH on AIX 5.1 but when I try to start it, it says: bash-2.05a# /usr/sbin/sshd bash-2.05a# bash-2.05a# tail /var/adm/syslog.out Jan 8 11:52:22 xyz sshd: fatal: Cannot bind any address. :confused: (31 Replies)
Discussion started by: untamed
31 Replies

6. Solaris

no sshd log

My ssh log appear to the screen which i want it to be log to /var/log/sshd.log how to log the sshd to /var/log? (5 Replies)
Discussion started by: hezry79
5 Replies

7. Solaris

sshd not able to restart

Hi, I was able to putty a few server (Solaris 10) of mine using hostname, but when i change to ip address, it shows login as: root Using keyboard-interactive authentication. Password: Access denied I change PermitRootLogin to yes. I tried to do a sshd restart, however ... (6 Replies)
Discussion started by: beginningDBA
6 Replies

8. Solaris

sshd and loginlog

I have shamelessly tried all the possible ways to see if my /var/adm/loginlog logs user access entries for ssh but nothing has worked for me so far..:confused: for telnet login its working fine. Adding auth.info in syslog.conf works but i dont want that output. Is there any way to edit... (2 Replies)
Discussion started by: ningy
2 Replies

9. Solaris

pam sshd error

Hi I wanted to convert my pam libraries to 64 bit. so recently compiled my pam_banner and pam_wheel to 64 bit. I got the following error... sshd: dlsym failed pam_sm_authenticate:error ld.so.1 : sshd fatal: pam_sm_authenticate: can't find symbol thnaks (8 Replies)
Discussion started by: chinchao
8 Replies

10. Red Hat

Sshd - error

Hi, Do you know what cause the error message ? Nov 19 13:42:19 cfsasnd02 sshd: pam_env(sshd:setcred): non-alphanumeric key '-- /etc/environment' in /etc/environment', ignoring Nov 19 13:42:20 cfsasnd02 sshd: pam_env(sshd:setcred): non-alphanumeric key '-- /etc/environment' in... (0 Replies)
Discussion started by: xitrum
0 Replies
Config::Model::Backend::Augeas(3pm)			User Contributed Perl Documentation		       Config::Model::Backend::Augeas(3pm)

NAME
Config::Model::Backend::Augeas - Read and write config data through Augeas SYNOPSIS
# model specification with augeas backend { config_class_name => 'OpenSsh::Sshd', # try Augeas and fall-back with custom method read_config => [ { backend => 'augeas' , file => '/etc/ssh/sshd_config', # declare "seq" Augeas elements sequential_lens => [/AcceptEnv AllowGroups [etc]/], }, { backend => 'custom' , # dir hardcoded in custom class class => 'Config::Model::Sshd' } ], # write_config will be written using read_config specifications element => ... } DESCRIPTION
This class provides a way to load or store configuration data through Config::Augeas. This way, the structure and commments of the original configuration file will preserved. To use Augeas as a backend, you must specify the following "read_config" parameters: backend Use "augeas" (or "Augeas")in this case. save Either "backup" or "newfile". See "Constructor" in Config::Augeas for details. file Name of the configuration file. sequential_lens This one is tricky. Set to one when new Augeas list or hash node must be created for each new list or hash element. See "Sequential lens" for details. For instance: read_config => [ { backend => 'augeas' , save => 'backup', file => '/etc/ssh/sshd_config', # declare "seq" Augeas elements sequential_lens => [/AcceptEnv AllowGroups/], }, ], Sequential lens Some configuration files feature data that must be written as list or as hash. Depending on the syntax, Augeas list or hash lenses can be written so that new "container" nodes are required for each new element. For instance, "HostKey" lines can be repeated several times in "sshd_config". Since Augeas must keep track of these several lines, Augeas tree will be written like: /files/etc/ssh/sshd_config/HostKey[1] /files/etc/ssh/sshd_config/HostKey[2] /files/etc/ssh/sshd_config/HostKey[3] and not: /files/etc/ssh/sshd_config/HostKey/1 /files/etc/ssh/sshd_config/HostKey/2 /files/etc/ssh/sshd_config/HostKey/3 The "HostKey" node is created several times. A new hostkey must be added with the following syntax: /files/etc/ssh/sshd_config/HostKey[4] and not: /files/etc/ssh/sshd_config/HostKey/4 So the "HostKey" lens is sequential. The situation is more complex when syntax allow repeated values on several lines. Like: AcceptEnv LC_PAPER LC_NAME LC_ADDRESS AcceptEnv LC_IDENTIFICATION LC_ALL Augeas will have this tree: /files/etc/ssh/sshd_config/AcceptEnv[1]/1 /files/etc/ssh/sshd_config/AcceptEnv[1]/2 /files/etc/ssh/sshd_config/AcceptEnv[1]/3 /files/etc/ssh/sshd_config/AcceptEnv[2]/4 /files/etc/ssh/sshd_config/AcceptEnv[2]/5 Note that the first index between squarekeeps track of how are grouped the "AcceptEnv" data, but the real list index is after the slash. Augeas does not require new elements to create "AcceptEnv[3]". A new element can be added as : /files/etc/ssh/sshd_config/AcceptEnv[2]/6 So this lens is not sequential. The same kind of trouble occurs with hash elements. Some hashes tree are like: /files/etc/foo/my_hash/my_key1 /files/etc/foo/my_hash/my_key2 Others are like: /files/etc/foo/my_hash[1]/my_key1 /files/etc/foo/my_hash[2]/my_key2 Note that a list-like index is used with the hash key. This also depends on the syntax of the configuration file. For instance, "Subsystem" in "sshd_config" can be : Subsystem sftp /usr/lib/openssh/sftp-server Subsystem fooftp /usr/lib/openssh/fooftp-server Subsystem barftp /usr/lib/openssh/barftp-server This (unvalid) sshd configuration is represented by: /files/etc/ssh/sshd_config/Subsystem[1]/sftp /files/etc/ssh/sshd_config/Subsystem[2]/fooftp /files/etc/ssh/sshd_config/Subsystem[3]/barftp Any new Subsystem must be added with: /files/etc/ssh/sshd_config/Subsystem[4]/bazftp In this case, the hash is also sequential. For these examples, the augeas backend declaration must feature: sequential_lens => [qw/HostKey Subsystem/], Augeas backend limitation The structure and element names of the Config::Model tree must match the structure defined in Augeas lenses. I.e. the order of the element declared in Config::Model must match the order required by Augeas lenses. Sometimes, the structure of a file loaded by Augeas starts directly with a list of items. For instance "/etc/hosts" structure starts with a list of lines that specify hosts and IP addresses. The "set_in" parameter specifies an element name in Config::Model root class that will hold the configuration data retrieved by Augeas. Log and trace This module use Log::Log4perl to log debug and info trace with "Data::Read" and "Data::Write" categories. CAVEATS
o Augeas "#comment" nodes are ignored SEE ALSO
o http://augeas.net/ : Augeas project page o Config::Model o Augeas mailing list: http://augeas.net/developers.html o Config::Model mailing list : http://sourceforge.net/mail/?group_id=155650 AUTHOR
Dominique Dumont, <ddumont at cpan dot org@<gt> COPYRIGHT
Copyright (C) 2008-2010 by Dominique Dumont LICENSE
This library is free software; you can redistribute it and/or modify it under the LGPL terms. perl v5.14.2 2012-07-10 Config::Model::Backend::Augeas(3pm)
All times are GMT -4. The time now is 06:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy