SSH login alerts with telegram push notifications | linux pam implementation

Sdílet
Vložit
  • čas přidán 28. 08. 2024

Komentáře • 9

  • @techwithmarco
    @techwithmarco  Před 6 měsíci

    Head over to my github to find the code snippet :)
    github.com/marcogreiveldinger/videos/tree/main/ssh-login-alerts

  • @Rodrigo_Brito
    @Rodrigo_Brito Před měsícem

    Thanks for this.

  • @stevdodd7515
    @stevdodd7515 Před 6 měsíci +1

    Hey, this is awesome! Thanks a bunch, it works like a charm! 👍

  • @raghavendarsridhar4403
    @raghavendarsridhar4403 Před 6 měsíci +1

    Thank you for the video, I didn't know this was possible, I tried it for discord but the PAM fails while login, yet the bash script executes good

    • @techwithmarco
      @techwithmarco  Před 6 měsíci

      With discord it is even a little easier. You have to create an integration webhook and set it to your desired channel and then put a curl command:
      like this:
      curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"Some sample message\"}" discord.com/api/webhooks/your-webhook-id

    • @techwithmarco
      @techwithmarco  Před 6 měsíci

      And maybe you can check the logs of the pam modules and see why it did not work?

    • @raghavendarsridhar4403
      @raghavendarsridhar4403 Před 6 měsíci

      @@techwithmarco Thank you for the snippet, I wish I was here again to see your comment rather than goggling xD, I was using the same Curl command, and At last it was the `session required` thing If I changed it to `session optional`, Now it works flawlessly

    • @techwithmarco
      @techwithmarco  Před 6 měsíci

      Ah good to know! Then something with your PAM chain might not be right. I am not that deep into how these modules exactly work, but it might be worth for you to check if there are some custom settings done