Skip to content

Instantly share code, notes, and snippets.

@coliveiraeti
Created December 5, 2017 21:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coliveiraeti/75619bc1f21942de08eb4e7e367e0a91 to your computer and use it in GitHub Desktop.
Save coliveiraeti/75619bc1f21942de08eb4e7e367e0a91 to your computer and use it in GitHub Desktop.
Disabling port 6010 on Ubuntu 16.04

Introduction

When I finally finished setting up a new VPS for my side projects, I realized this unknown (at least for me) open port: 6010.

Open Ports

It took me a quick search on Google to find out it was related to the X11 Forwarding feature present on SSH. If you don't need this feature in your server, disabling it is actually very simple.

Solution

Edit your SSH server configuration file:

# vi /etc/ssh/sshd_config

Find the line containing the X11Forwarding option and change it to no:

X11Forwarding no

Save the file and restart SSH server:

# service sshd restart

Don't forget to reconnect to server before checking the listening ports again!

# lsof -i4 | grep LISTEN

That's it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment