+ Reply to Thread
Results 1 to 3 of 3

Thread: How to change the SSH port of Linux

  1. #1
    HWHT Starter LionTechservers is on a distinguished road
    Join Date
    Apr 2018

    How to change the SSH port of Linux

    How to change the SSH port of Linux?

    Welcome to exchange!!!!!

  2. #2
    HWHT Starter dineshsma is on a distinguished road
    Join Date
    Jun 2018
    Its simple. Log into through SSH to the server using root login. The edit the file /etc/ssh/sshd_config using any text editor of your choice like vi, nano, pico or emacs.

    Then search:
    #Port 22
    Replace with:
    Port 2020
    Once you saved and restarted sshd service. It will listen on port 2020.
    Make sure you open the new SSH port in firewall before change the SSh configuration otherwise you will get locked.
    TRY OUT FREE!!! -- Expert in Server Management, Server Hardening & Server Optimization.
    24x7 Whitelabel Outsourced Support - Helpdesk, Livechat, Messenger.
    IM (skype): servermanagementadmins Email: sales[@]servermanagementadmins[.]com

  3. #3
    HWHT Addict hostechsupport is on a distinguished road
    Join Date
    Sep 2006
    Just edit the file /etc/ssh/sshd_config using any text editor remove the hash before port and replace 22 with your desired port save the file.
    Add the new port in the firewall and restart sshd service finally you can check through netstat the new port must be listening on the new port.
    15 Days Free 24x7 Remote Technical Support(Valid till 4th Nov)
    Server Management, Cloud Server Management
    Dedicated & VPS Server Management

    24x7 Remote Technical Support

+ Reply to Thread

Similar Threads

  1. how to change nameserver?
    By plachira in forum DNS
    Replies: 5
    Last Post: 10-25-2018, 06:05 PM
  2. change the default SSH port 22
    By thewebhostingdir in forum Technical and Security Tutorials
    Replies: 4
    Last Post: 07-18-2018, 08:54 PM
  3. Should I change this page?
    By Just199-Dave in forum SEO Tools and Software Utilities
    Replies: 0
    Last Post: 10-02-2007, 05:05 PM
  4. HTTP server (port 80) is down?
    By xammy in forum HCC-Announcements, HCC-Feedback, HCC Questions
    Replies: 2
    Last Post: 07-06-2006, 07:43 AM
  5. Allow SMTP through port 26
    By incript_services in forum Web Hosting Tutorials
    Replies: 3
    Last Post: 09-19-2005, 05:24 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts