Get a Text When Someone Signs In to Your Computer

uxlogin texts you every time someone signs in to your computer. If it wasn't you, you know right away, not weeks later. It never blocks or slows down a sign-in.

Want to approve each sign-in instead, with the PC locked until you reply? That's TextAlertX.

What the texts look like

Sign-in: OFFICE-PC\jim on OFFICE-PC (Remote Desktop) from 203.0.113.9 at 21:14 Sep 27

1. Get your API key

It's on your account screen. No account yet? Start a free trial, then add your mobile number on the account screen so alerts come by text.

Easiest: run uxsend once. It asks for the key and saves it, and the other example programs then find it automatically. Or set it yourself in USERALERTX_API_KEY.

2. Windows

uxlogin.ps1 covers signing in at the PC, Remote Desktop and, if you like, unlocking. Save it as C:\UserAlertX\uxlogin.ps1, open PowerShell with Run as administrator, and run once:

powershell -ExecutionPolicy Bypass -File C:\UserAlertX\uxlogin.ps1 -Install
  • Add -Unlock to also text you when the PC is unlocked.
  • Add -Trusted "192.168.1." to skip Remote Desktop sign-ins from your own network.
  • Remove it with -Uninstall.

3. Linux / Mac (SSH)

uxlogin.sh. On Linux, one line in /etc/pam.d/sshd covers every account:

session optional pam_exec.so /usr/local/bin/uxlogin.sh

On a Mac, or without root, add it to your own ~/.ssh/rc. Setup details are at the top of the file.

Good to know

  • Cost: 1 token per sign-in text. A computer you sign in to many times a day uses tokens quickly, so -Trusted for your own network helps.
  • Pause for a while by replying P to any alert text; START resumes.