Created
April 23, 2026 21:51
-
-
Save mrjk/3e9d2aec16b9e2b1c8a7bddf00a807f2 to your computer and use it in GitHub Desktop.
Script to display whois connected to what
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| title () | |
| { | |
| local msg="$@" | |
| echo | |
| echo "========================" | |
| echo " $msg" | |
| echo "========================" | |
| } | |
| title "Current connections (who)" | |
| who | |
| title "List listening services (netstat -l)" | |
| netstat -lntpu | |
| title "Current SSH connections on port 22" | |
| netstat -taupen | sort -k 7 | grep ':22[^0-9]' | |
| #title "Current Proxmox API connection on port 8006" | |
| #netstat -taupen | sort -k 7 | grep ':8006[^0-9]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment