- create a slack webhook integration - copy the webhook url
- add following to top of ~/.ssh/config
Host *
PermitLocalCommand yes
- 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!"}'
- Profit!
Use at your own risk