Port 6000 is the X11 (X Window System) display server port. Display :0 listens on port 6000, display :1 on 6001, and so on. X11 over TCP has no encryption and minimal authentication (xhost) – exposed X11 ports allow attackers to capture keystrokes and screen content. Modern systems disable TCP X11 and use Unix sockets.
Port Number
6000
Protocol
TCP
Service
X Window System
Range
IANA Registered (1024–49151)
Check if X11 is listening on TCP (should show nothing on modern systems)
ss -tlnp | grep ':600[0-9]'Show current X11 access control list (look for 'access control disabled' = vulnerable)
xhostScan for open X11 displays on a host
nmap -p 6000-6005 targetVerify -nolisten tcp is set in X server startup
cat /etc/X11/xinit/xserverrc | grep nolistenxhost +remote_host # DANGEROUS
ssh -X user@host xeyes
nmap -p 6000 target
DISPLAY=:0 xdpyinfoX Window System was developed at MIT in 1984. Port 6000 was chosen for display :0 (6000 + display number). X11 was designed for the MIT campus network where trust was assumed. The protocol has never been updated for modern security requirements – no encryption, no mandatory authentication. SSH X forwarding (1995) became the standard for remote X11 access. Wayland (2012, production-ready ~2020) replaces X11 with a protocol that has no network transparency by design.
Is X11 forwarding over SSH secure?
Yes – ssh -X tunnels the X11 protocol through the encrypted SSH connection. The remote application connects to a virtual display that SSH relays securely. However, ssh -X with ForwardX11Trusted=yes (or ssh -Y) allows the remote side to snoop on your local display. Use ssh -X (untrusted forwarding) which restricts the remote application's access to your display via the SECURITY extension.
How do I check if my X11 is exposed?
Run: ss -tlnp | grep 6000. If nothing appears, TCP X11 is disabled (safe). If Xorg is listening on 0.0.0.0:6000 or :::6000, add -nolisten tcp to your X server startup (/etc/X11/xinit/xserverrc or the display manager config). Also check xhost output – if it shows 'access control disabled, clients can connect from any host', run xhost - immediately.