<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.3790.2759" name=GENERATOR></HEAD>
<BODY>
<DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=466512720-11102006>The user (nagios) is the id that is executing both ssh 
and check_by_ssh.  <SPAN class=200070921-11102006>W</SPAN>hen these 
commands are run, the "environments" established for ssh and check_by_ssh are 
different<SPAN class=200070921-11102006> (why)?</SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=466512720-11102006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=466512720-11102006><FONT face=Arial><FONT 
color=#0000ff><FONT size=2>Below is the environment established for 
<STRONG>ssh</STRONG><SPAN 
class=200070921-11102006>:</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=466512720-11102006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>SHELL=/bin/bash</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>SSH_CLIENT=10.8.24.170 58641 22</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>USER=nagios</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>LS_COLORS=</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>ORACLE_SID=ver_9206</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>ORACLE_BASE=/oracle</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>ORACLE_ADHOC=/oracle/local/adhoc</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>MAIL=/var/mail/nagios</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>PATH=/usr/bin:/bin:/usr/sbin:/sbin</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>TNS_ADMIN=/oracle/network/admin</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>PWD=/home/nagios</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>LANG=en_US.UTF-8</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>SQLPATH=/oracle/local/adhoc:%PATH</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>SHLVL=1</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>HOME=/home/nagios</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>LS_OPTIONS=-N --color=non -T O</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>LOGNAME=nagios</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>SSH_CONNECTION=10.8.24.170 58641 10.8.24.191 
22</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>ORACLE_HOME=/oracle/product/9.2.0.6</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>_=/usr/bin/env</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=466512720-11102006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=466512720-11102006>And, here is the environment when running the command, 
<STRONG>check_by_ssh</STRONG>:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=466512720-11102006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><SPAN class=466512720-11102006>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>SHELL=/bin/bash</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>SSH_CLIENT=10.8.24.170 58641 22</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>USER=nagios</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>LS_COLORS=</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>MAIL=/var/mail/nagios</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>PATH=/usr/bin:/bin:/usr/sbin:/sbin</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>PWD=/home/nagios</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>SHLVL=1</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>HOME=/home/nagios</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>LS_OPTIONS=-N --color=non -T O</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>LOGNAME=nagios</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>SSH_CONNECTION=10.8.24.170 58641 10.8.24.191 
22</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006>_=/usr/bin/env</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=466512720-11102006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Courier><SPAN class=466512720-11102006>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=466512720-11102006>I'm running both commands f<SPAN 
class=200070921-11102006>ro</SPAN>m the same server as user, nagios.  It 
appears that <STRONG>check_by_ssh</STRONG> changes my env settings (notice that 
there are <U>no</U> 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.</SPAN></FONT></DIV></SPAN></FONT></DIV></SPAN></FONT></DIV></DIV></BODY></HTML>