execute part of shell script on remote machine

后端 未结 4 744
逝去的感伤
逝去的感伤 2021-01-26 03:49

I am logging into remote machine through shell script (by placing ssh command in script). After ssh command ,The remaining lines of the script are getting executed on the curre

4条回答
  •  遥遥无期
    2021-01-26 04:17

    Is your login passwordless.

    If yes, you can just use pipe to execute the statement on the remote machine

    like:

    cat myshellscript.sh | ssh blah@blah.com -q
    

提交回复
热议问题