How do I set $PATH such that `ssh user@host command` works?

前端 未结 6 1971
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 10:37

I can\'t seem to set a new $PATH such that it is used when executing commands via ssh user@host command. I have tried adding export PATH=$PATH:$HOME/new_

6条回答
  •  情书的邮戳
    2020-11-27 10:53

    Just had the same problem myself, solved it with:

    ssh user@remotehost PATH=\$HOME/bin:\$PATH\; remote-command
    

提交回复
热议问题