Passing variables in remote ssh command

前端 未结 7 1665
余生分开走
余生分开走 2020-12-04 11:59

I want to be able to run a command from my machine using ssh and pass through the environment variable $BUILD_NUMBER

Here\'s what I\'m trying:



        
相关标签:
7条回答
  • 2020-12-04 12:26

    Escape the variable in order to access variables outside of the ssh session: ssh pvt@192.168.1.133 "~/tools/myScript.pl \$BUILD_NUMBER"

    0 讨论(0)
提交回复
热议问题