check_by_ssh vs. ssh (when executed, have different environments)

Bret Goodfellow Bret.Goodfellow at questar.com
Wed Oct 11 23:13:41 CEST 2006


The user (nagios) is the id that is executing both ssh and check_by_ssh.
When these commands are run, the "environments" established for ssh and
check_by_ssh are different (why)?
 
Below is the environment established for ssh:
 
SHELL=/bin/bash
SSH_CLIENT=10.8.24.170 58641 22
USER=nagios
LS_COLORS=
ORACLE_SID=ver_9206
ORACLE_BASE=/oracle
ORACLE_ADHOC=/oracle/local/adhoc
MAIL=/var/mail/nagios
PATH=/usr/bin:/bin:/usr/sbin:/sbin
TNS_ADMIN=/oracle/network/admin
PWD=/home/nagios
LANG=en_US.UTF-8
SQLPATH=/oracle/local/adhoc:%PATH
SHLVL=1
HOME=/home/nagios
LS_OPTIONS=-N --color=non -T O
LOGNAME=nagios
SSH_CONNECTION=10.8.24.170 58641 10.8.24.191 22
ORACLE_HOME=/oracle/product/9.2.0.6
_=/usr/bin/env
 
And, here is the environment when running the command, check_by_ssh:
 
SHELL=/bin/bash
SSH_CLIENT=10.8.24.170 58641 22
USER=nagios
LS_COLORS=
MAIL=/var/mail/nagios
PATH=/usr/bin:/bin:/usr/sbin:/sbin
PWD=/home/nagios
SHLVL=1
HOME=/home/nagios
LS_OPTIONS=-N --color=non -T O
LOGNAME=nagios
SSH_CONNECTION=10.8.24.170 58641 10.8.24.191 22
_=/usr/bin/env
 
I'm running both commands from the same server as user, nagios.  It
appears that check_by_ssh changes my env settings (notice that there are
no ORACLE environments specified).  Does check_by_ssh not use the
/etc/ssh/config settings?  Where is this done?  I would almost believe
that check_by_ssh bypasses the default ssh settings for sending env
variables.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20061011/44f2d5b4/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list