Hi,
I'm trying to add an ~/bin to my PATH on a remote server running Linux (I don't know exactly what flavor). After reading the bash manual, I modified ~/.bash_profile to add ~/bin to my path.
$ ssh username@server.net
username@server:~$ echo $PATH
/home/username/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/custom/sys/sbcl/sbcl/bin
Which works perfectly fine. The problem is that when I try to use darcs push over ssh, it can't find darcs on the remote machine because bash doesn't read ~/.bash_profile for non-interactive logins.
$ ssh username@server.net 'echo $PATH'
/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
I believe it may be possible to affect PATH unconditionally for all logins, but all the methods I am aware of require modifying a system file like /etc/..., none of which I have write access for (and even if I did, wouldn't want to change).
I've also heard that ssh can be configured with a custom path by modifying ~/.ssh/environment, but I believe this requires setting "PermitUserEnvironment yes" in /etc/ssh/sshd_config, which I also don't have access to.
Are there any other ways to configure a user-specific PATH for non-interactive ssh sessions? Or do I need to go to system admins with this problem?
Thanks in advance.
Bookmarks