How to configure PATH for non-interactive SSH?

When I run ssh some-host 'echo $PATH' I get /usr/local/bin:/usr/bin:/bin. I need to configure some-host so that it will include /sbin in the PATH. How can I do that? Everything I find on google has to do with bash. Modifying .shrc and .profile don't have any effect.
 
Faced with that issue in the past, I have just used absolute path names. [Edit: I prefer this method because it's reliable.]

However, if you don't login with a shell, I'm pretty sure that the path specified by login.conf(5) methods will prevail:
Code:
[gunsynd.215] $ echo $PATH
/home/phil/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/sbin:/usr/sbin # from my Bourne shell .profile
[gunsynd.216] $ strings /usr/sbin/sshd | grep bin | grep ":"         # the default path for sshd
/usr/bin:/bin:/usr/sbin:/sbin
[gunsynd.217] $ grep path= /etc/login.conf | grep -v "^#" | head -1  # the default path for login.conf
    :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\
[gunsynd.218] $ ssh localhost 'echo $PATH'                           # what I get with ssh when I don't login
/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/phil/bin
 
Back
Top