sergio_educacionit

monitor de conexiones

Dec 17th, 2025
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3.  
  4. while :;do
  5.  
  6. clear
  7. netstat -t | grep ESTABLISHED
  8.  
  9. if netstat -tn | grep -v 192.168.0.78:22 | grep 192.168.0.97; then
  10.  
  11. echo "Se detecto la conexion del host 192.168.0.97"
  12.  
  13. break
  14.  
  15.  
  16. fi
  17.  
  18. sleep 0.5
  19.  
  20. done
  21.  
  22.  
  23. echo Se termino el programa
  24.  
Advertisement
Add Comment
Please, Sign In to add comment