Skip to content

Instantly share code, notes, and snippets.

@enijar
Created August 24, 2016 08:38
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 enijar/b346659abc5762e63acd38bf0629725b to your computer and use it in GitHub Desktop.
Save enijar/b346659abc5762e63acd38bf0629725b to your computer and use it in GitHub Desktop.
Execute Set of Tasks via SSH
#!/usr/bin/env bash
ssh -i ~/path/to/ssh_key username@255.255.255.255 -T <<EOF
echo "Execute some set of tasks"
cd /path/to/some/dir
echo "Pulling from master branch..."
git pull
echo -e ""
exit
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment