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

前端 未结 6 1970
伪装坚强ぢ
伪装坚强ぢ 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

    You can always say:

    ssh remotemachine 'export PATH=wedontneedastinkingpath; echo $PATH'
    

提交回复
热议问题