I am having an issue passing a command through ssh which uses an environment variable. I would like the environment variable to be read from the remote host, but it is being read from the local host.

For instance:

ssh rhost ls -lm $WWW_HOME

$WWW_HOME is set as /usr/www on local but /var/www on the remote so it is being read as :

ssh rhost ls -lm /usr/www

and I'd like it to be

ssh rhost ls -lm /var/www

Any thoughts would be appreciated, thanks for your help.
openssh-unix-dev mailing list