How do I check how many vnc connections or different users are currently connected to my machine? Only through wireshark? And how do I kill any other users connected through vnc?
Would tell you the currently established TCP connections on port 5900.
For anything else, we'd need to know what VNC server you're using as there exist dozens.
If you know the name of the VNC server command,
(as the user running the VNC server or as root) would also tell you the currently established TCP connections handled by that VNC server (in case it's not on port 5900).
Among the methods to close a TCP connection in the general case, there's:
According to this article the following command will show connections to processes containing "VNC command-line":
Please note that the
Assuming your vnc server is Xvnc, try this one-liner:
This will list active connections and show you their process PID and IP addresses.