Welcome to Centmin Mod Community
Register Now

Install changing sshd port back to 22

Discussion in 'Install & Upgrades or Pre-Install Questions' started by noly, Jul 27, 2017.

Tags:
  1. noly

    noly Premium Member Premium Member

    69
    10
    8
    Jul 24, 2017
    Frankfurt/Germany
    Ratings:
    +20
    Local Time:
    7:08 AM
    1.13.x
    10.x
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.13.3
    • PHP Version Installed: 7.0.20
    • MariaDB MySQL Version Installed: 10.1.25
    • When was last time updated Centmin Mod code base ? : code is uptodate
    • Persistent Config:
      NGXDYNAMIC_NGXPAGESPEED='y'
      NGINX_PAGESPEED='y'

    Hello and hi community :)

    changing sshd port is a must to add more security to your environment. Very happy that menu #16 offers that.

    But trying to change it back to port 22 seems not possible.
    I get the following message:

    Code:
    Enter the SSH port number you want to change to: 22
    the new port 22 is already in use by other software defined by CSF Firewall
    please re-run menu option 16 and try a different port
    aborting...
    Am i missing a step or is it just not possible to change the port back to 22?
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,159
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    3:08 PM
    Nginx 1.13.x
    MariaDB 5.5
    centmin.sh menu option 16 first asks for existing sshd port, then the new desired sshd port

    to change from 22 to say 78

    so 1st change
    - existing port = 22
    - new port = 78

    if changing back from 78 to 22
    - existing port = 78
    - new port = 22

    but looks like that check catches port 22 on TCP_OUT

    why change it back ?
     
    Last edited: Jul 27, 2017
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    30,159
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    3:08 PM
    Nginx 1.13.x
    MariaDB 5.5
    updated 123.09beta01 with fix in centmin.sh menu option 16 Beta Branch - fix inc/sshd.inc change sshd port back to 22. centmin.sh menu option 23 submenu option 2 update, exit centmin.sh and then re-run centmin.sh menu option 16

    Upgrading Centmin Mod Code to Latest Version



    Getting Started Guide step 19 outlines also how to keep Centmin Mod code updated or how to switch version branches.

    Centmin Mod LEMP stack's script code is constantly updated for improvements, bug fixes and security fixes so keeping the Centmin Mod code up to date is important. With Centmin Mod 1.2.3-eva2000.08) (123.08stable) and higher releases, a newly added centmin.sh menu option 23 allows much easier code updates and version branch swicthing via Git backed environment you can setup. For full details read the following links:
     
    • Friendly Friendly x 1
  4. noly

    noly Premium Member Premium Member

    69
    10
    8
    Jul 24, 2017
    Frankfurt/Germany
    Ratings:
    +20
    Local Time:
    7:08 AM
    1.13.x
    10.x
    another bug squashed :D
     
    • Like Like x 1
  5. eva2000

    eva2000 Administrator Staff Member

    30,159
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    3:08 PM
    Nginx 1.13.x
    MariaDB 5.5
    yup :D
     
    • Like Like x 1