Use Terminal.app to ssh to multiple hosts
You can write a shell script and put it in ~/.bashrc like this:

function do_some_thing() {
  command="fab -R localhost deploy --set sha=master"
  ssh -t ubuntu@1.2.3.4 -C "$command"
  ssh -t ubuntu@1.2.3.5 -C "$command"
  ssh -t ubuntu@1.2.3.6 -C "$command"
  ssh -t ubuntu@1.2.3.7 -C "$command"
}


However there are various tools you can use for this type of activity, like Chef or Capistrano or various others.