the most secure/sure way, is to edit your sshd_config file, add "PermitUserEnvironment yes", restart sshd, then create a file ~/.ssh/environment and set the environment variable you want.where can I find the config file?
I would prefer not to do
"pwd; echo $PATH" => "pwd; PATH=$PATH:/something echo $PATH"as there're lots of env variables.