Skip to content

Instantly share code, notes, and snippets.

@ottonet
Forked from glongman/gist:72884af5edebdfe5bec1
Last active September 21, 2015 13:37
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 ottonet/85fde3525916d2c67485 to your computer and use it in GitHub Desktop.
Save ottonet/85fde3525916d2c67485 to your computer and use it in GitHub Desktop.
Broadcast ssh login to Production into Slack
  1. create a slack webhook integration - copy the webhook url
  2. add following to top of ~/.ssh/config
Host *
  PermitLocalCommand yes
  1. add LocalCommand to host entry
Host production.example.com
  User ubuntu
  LocalCommand curl -XPOST '<webhook url here>' -d '{"text":"Geoff connected to prod (%n) via ssh!"}'
  1. Profit!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment