• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
NameHero Blog

NameHero Blog

Web Hosting Tips & Resources From NameHero

  • Hosting
    • Web Hosting
    • VPS Hosting
    • WordPress Hosting
    • WooCommerce Hosting
  • Reseller
  • Enterprise
  • Domains
  • Account
  • Blog Home
  • Categories

How To Change The SSH Port On An InterWorx VPS

Bhagwad Park

Published on: October 2, 2019

Categories: InterWorx, VPS Hosting 0

Earlier this week, I’d shown you how to connect to a VPS with InterWorx on SSH. In that, we saw that the default installation uses the regular SSH port of “22” for connections. In this article, I’ll show you how to change the SSH port. Why? Because look at this screenshot from my SSH login:

Failed SSH Login Attempts

My last login was 2 days ago, and since then there have been 458 failed login attempts. These are just random spam attacks trying to break into the system. By changing the port to something other than “22”, we can add another layer of security. So here’s how to go about it.

Access the SSH Section in InterWorx

The first step is accessing your InterWorx login area. Once you’re in, select “System Services” on the left-hand side and choose “SSH Server” like this:

Choose SSH Server on InterWorx

Now on the right, you’ll see a box titled “SSH Server Options”. In the field labeled “Port”, change the number 22 to something else. In this example, I’m going to use “2099”:

Change the SSH Port

Click the “Update” button below and save your changes. But wait! We’re not done. We now need to unblock this port on the CSF firewall.

Unblocking the Port on the ConfigServer Firewall

InterWorx on NameHero comes pre-installed with the ConfigServer (csf) firewall. Stock installs of CentOS often come with something called “firewalld”. But I’ve personally used CSF before and prefer it a lot more. And NameHero agrees with me! So after saving your SSH port changes, click the “ConfigServer Plugins” section on the left and select “Security & Firewall” as shown here:

Select Security and Firewall

Now scroll down and find the “Firewall Configuration” button and click it:

Choose Firewall Configuration

Once there, use your browser’s “find” functionality to search for the field “TCP_IN”. When you get it, add the new port number to the end of the existing list separated by a comma (,) like this:

Go to "TCP_IN"

Now scroll all the way down and click the “Change” button to save the configuration files:

Save Firewall Settings

Once that’s done, you need to restart the CSF firewall and you’ll be prompted to do so in the next screen as shown here:

Restart the Firewall

Click the restart button and you’re done!

Testing your Changes

Now when you try and access SSH with port 22 using PuTTY as explained in the earlier tutorial, you should get a “Connection refused” message like this:

SSH Connection Refused

That’s excellent news! It means the system is working as intended. Update your PuTTY configuration screen to include the new port number (In this case 2099), and you should be able to access your server via SSH using the new anonymous port!

This is a form of security known as “security by obfuscation”. It’s actually frowned upon my security “experts” because it’s not technically “security”. In my next article I’ll explain why this is just theoretical nonsense. It’s actually quite useful!

Bhagwad Park Profile Picture
Bhagwad Park

I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow & Subscribe

Exclusive promos, content and more!

Most Popular Posts

Speed up your site: solving the WordPress slowdown

NameHero’s Recommended WordPress Plugin and Theme Setup (2023)

How To Increase The InnoDB Buffer Pool Size

How To Fix A Stuck All-in-One WP Migration Import

How To Add A Subdomain In Cloudflare

Top Categories

  • WordPress
  • WordPress Tutorials
  • Enterprise Hosting
  • WooCommerce
  • Web Hosting
  • Resellers
  • Website Security
  • Website Development
  • Website Performance
  • VPS Hosting
  • SEO Tips
  • Announcements
  • Domain Registration
NameHero

NameHero proudly provides web hosting to over 40,000 customers with 99.9% uptime to over 750,000 websites.

  • Master Card
  • Visa
  • American Express
  • Discover
  • Paypal
Products
  • Web Hosting
  • VPS Hosting
  • WordPress Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • Enterprise Hosting
  • Domains
Help & Support
  • NameHero Blog
  • Support
  • Knowledgebase
  • Announcements
  • Affiliates
Company
  • About Us
  • Contact Sales
  • Reviews
  • Uptime
  • We're Hiring

Copyright © 2023 NameHero, LLC. All rights reserved.

  • Privacy Policy
  • Terms of Use
  • Acceptable Use Policy
  • Payment Policy
  • DMCA