Skip to content

Instantly share code, notes, and snippets.

@enijar
Created August 24, 2016 08:38
Show Gist options
  • 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 [email protected] -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