Skip to content

Instantly share code, notes, and snippets.

@olivierpierre
Last active August 4, 2016 21:05
Show Gist options
  • Save olivierpierre/2c5318a5266aee4fef306e7153bdb498 to your computer and use it in GitHub Desktop.
Save olivierpierre/2c5318a5266aee4fef306e7153bdb498 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -euo pipefail
if [ "$1" == "" ] || [ "$2" == "" ]; then
echo "usage: $0 <vm_name> <cmd>"
exit
fi
ssh root@$1 ${*:2} 2>&1 | sed "s/^/[$1] /"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment