The environment variable LD_LIBRARY_PATH does not get set when one performs ssh
with a command to be executed on the remote system, so that we get the
following error message:
ssh 10.163.2.90 "get config scp /home/flr/test.txt"
get: error while loading shared libraries: libnvcore.so: cannot open shared
object file: No such file or directory
The LD_LIBRARY_PATH described in /etc/profile does not get set when performing
ssh with a command which is a problem that RedHat and other implementations
have had. We see the environment variables that get created when an ssh with a
command is offered by asking for set like this:
ssh 10.163.2.90 set
HOME='/home/flr'
IFS='
'
LOGNAME='flr'
PATH='/usr/local/bin:/usr/bin:/sbin:/bin'
PPID='27376'
PS1='\w \$ '
PS2='> '
PS4='+ '
PWD='/home/flr'
SHELL='/bin/sh'
USER='flr'
Now running ssh with no command so that we get a shell, the /etc/profile gets
adopted, as does /home/flr/.profile :
ssh 10.163.2.90
$ set
FREDTEST='exported'
HISTFILE='/home/flr/.ash_history'
HOME='/home/flr'
IFS='
'
LD_LIBRARY_PATH='/usr/safetran/lib'
LOGNAME='flr'
PATH='/usr/local/bin:/usr/bin:/sbin:/bin:/usr/safetran/bin'
PPID='30760'
PS1='\w \$ '
PS2='> '
PS4='+ '
PWD='/home/flr'
SHELL='/bin/sh'
TERM='xterm'
USER='flr'
_='FREDTEST=exported'
So the only thing I can think of right now is to have a script called "get.sh"
which sets environment variables as I need them which then executes get2 which
is the executable that I created ? which seems like it's ugly.
Does anyone have a better solution? The dropping of environment variables when
performing an ssh could very well be a security feature, but it seems to me to
be a bug.
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|