Skip to content

Instantly share code, notes, and snippets.

@yuuichi-fujioka
Created December 17, 2021 05:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuuichi-fujioka/b4a75a6cf848076d0b4756f2a3092d85 to your computer and use it in GitHub Desktop.
Save yuuichi-fujioka/b4a75a6cf848076d0b4756f2a3092d85 to your computer and use it in GitHub Desktop.
run single binary on remote host
cat helloworldbin | ssh server01 'sh -c '"'"'tmp=$(mktemp -d); cat > $tmp/helloworldbin; chmod +x $tmp/helloworldbin; $tmp/helloworldbin; rm -fr $tmp '"'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment