Want to subscribe to topics you're interested in?
Become a Member

Rsync refuse to connect after changing the ssh port from Centminmod menu

Discussion in 'System Administration' started by pamamolf, Dec 2, 2014.

  1. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    10:30 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    Hi
    I just change the default ssh port to 1012 on the main server and i try to connect from remote backup server to it using:


    Code:
    /usr/bin/rsync -az -e "/usr/bin/ssh -p 1012 -i /key/mysshkey" root@123.456.789.000:/backup/ /home/backup/
    And now i am getting :

    Code:
    ssh: connect to host 123.456.789.000 port 1012: Connection timed out
    I did the change on the port from Centminmod menu !

    Now i just disable csf firewall only on the backup server and it works but how can i allow it forever?

    Thanks
     
    Last edited: Dec 2, 2014
  2. eva2000

    eva2000 Administrator Staff Member

    53,828
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    6:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Getting started guide step 4 and CSF firewall page need to change the TCP_IN/OUT port listed for 22 to custom port and restart CSF firewall. For security reasons, you'd have to whitelist ports. By default 22 port is already whitelisted and if you used Centmin Mod centmin.sh menu option 16 it would of automatically done the change of sshd port and whitelisted your new sshd port

    Code:
    --------------------------------------------------------
    Centmin Mod 1.2.3-eva2000.07 - http://centminmod.com
    --------------------------------------------------------
                       Centmin Mod Menu                  
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB 5.2, 5.5, 10 Upgrade Sub-Menu
    12). Zend OpCache Install/Re-install
    13). Install ioping.sh vbtechsupport.com/1239/
    14). SELinux disable
    15). Install/Re-install ImageMagick PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: pigz,pbzip2,lbzip2,p7zip etc
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Re-install
    21). Update - Nginx + PHP-FPM + Siege
    22). Exit
    --------------------------------------------------------
    Enter option [ 1 - 22 ] 16
    
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    10:30 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    I add the ip on allow file and restart and it works....
    But i am sure that your way is better....
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,828
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    6:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    oh yes need to allow the ip too via CSF firewall - better security :)

    Code:
    csf -a ipaddress