title: How do I set $PATH such that `ssh user@host command` works?
body: <p>I can't seem to set a new $PATH such that it is used when executing commands via <code>ssh user@host command</code>.  I have tried adding <code>export PATH=$PATH:$HOME/new_path</code> to ~/.bashrc and ~/.profile on the remote machine, but executing <code>ssh user@host "echo \$PATH"</code> shows that the change has not been picked up (it shows /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games).  The remote machine is running Ubuntu 8.04.</p>
  
  <p>I'm sure I could hack it into /etc/profile, but that's not a clean solution and it only works when one has root access.</p>