getting bash to load my PATH over SSH

Posted by Eli Bendersky on Server Fault See other posts from Server Fault or by Eli Bendersky
Published on 2010-04-09T07:32:18Z Indexed on 2010/04/09 7:43 UTC
Read the original article Hit count: 640

Filed under:
|
|

This problem comes up with me trying to make svnserve (Subversion server) available on a server through SSH. I compiled SVN and installed it in $HOME/bin. Local access to it (not through SSH) works fine.

Connections to svn+ssh fail due to:

bash: svnserve: command not found

Debugging this, I've found that:

ssh user@server "which svnserve"

says:

which: no svnserve in (/usr/bin:/bin)

This is strange, because I've updated the path to $HOME/bin in my .bashrc, and also added it in ~/.ssh/environment. However, it seems like the SSH doesn't read it. Although when I run:

ssh user@server "echo $PATH"

It does print my updated path!

What's going on here? How can I make SSH find my svnserve? Thanks in advance

© Server Fault or respective owner

Related posts about ssh

Related posts about bash