[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh and PATH trouble



On Sat, May 22, 1999 at 05:21:27PM +0200, Ramin Motakef wrote
> Hi everybody!
> 
> I have some troble with ssh. I want to restart (or reload) services in
> /etc/init.d from a perl script. But what happens is:
> 
> root@nase[/root]# ssh  -x  vmdebian /etc/init.d/nfs-server reload 
> Reloading NFS servers configuration files.
> /etc/init.d/nfs-server: start-stop-daemon: command not found
> 
> So i did:
> 
> root@nase[/root]# ssh -x vmdebian echo $PATH
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
> 
> wich seems ok for me.
> 

Well, it would.  The shell you are running on nase expands variables in your
commands before they are executed; what you are seeing is the value of the
PATH variable on nase.  This will show the path on vmdebian:
 # ssh -x vmdebian echo \$PATH


John P.
-- 
huiac@camtech.net.au
john@huiac.apana.org.au
"Oh - I - you know - my job is to fear everything." - Bill Gates in Denmark


Reply to: