Join the community today
Become a Member

Changing ssh port not working on Centos 7

Discussion in 'Install & Upgrades or Pre-Install Questions' started by pamamolf, Feb 26, 2015.

  1. pamamolf

    pamamolf Premium Member Premium Member

    4,056
    427
    83
    May 31, 2014
    Ratings:
    +828
    Local Time:
    7:14 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    Hi

    I just try to change the ssh port on Centos 7 but was not working :(

    It was not auto added on tcp in on csf and on :


    Code:
    /etc/ssh/sshd_config
    was not enabled the line Port 1022
     
  2. eva2000

    eva2000 Administrator Staff Member

    51,985
    11,976
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,473
    Local Time:
    2:14 AM
    Nginx 1.25.x
    MariaDB 10.x
    did you follow instructions on the menu option 16, to first enter default sshd port then the port you want to change to ?
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    4,056
    427
    83
    May 31, 2014
    Ratings:
    +828
    Local Time:
    7:14 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    Yes i add the default port 22 and then new port...easy to follow instructions....

    To make it work i just edit manual the:

    Code:
    /etc/ssh/sshd_config
    and remove the comment from:
    Code:
    Port 1022
    Then restart sshd and all was fine and i also add a custom iptables accept rule :)

    Like doing everything manually ......
     
  4. eva2000

    eva2000 Administrator Staff Member

    51,985
    11,976
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,473
    Local Time:
    2:14 AM
    Nginx 1.25.x
    MariaDB 10.x
  5. pamamolf

    pamamolf Premium Member Premium Member

    4,056
    427
    83
    May 31, 2014
    Ratings:
    +828
    Local Time:
    7:14 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    Don't know what to say :(