Skip to content

Instantly share code, notes, and snippets.

@glongman
Last active September 21, 2015 13:37
Show Gist options
  • Save glongman/72884af5edebdfe5bec1 to your computer and use it in GitHub Desktop.
Save glongman/72884af5edebdfe5bec1 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!
@glongman
Copy link
Author

glongman commented Feb 9, 2015

Use at your own risk

@marclennox
Copy link

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment