Want more timely Centmin Mod News Updates?
Become a Member

OVH OVH dedicated servers

Discussion in 'Dedicated server hosting' started by eva2000, Jun 12, 2014.

  1. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:50 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    shouldn't need to do that - just access via out of band IPMI KVM Java console
     
  2. Jimmy

    Jimmy Well-Known Member

    1,707
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    1:50 AM
    1.17.x
    MariaDB 10.3.x
    Didn't even think about that. I'm reinstalling now. I'm going to test it out with the only change being the ListenAddress. See what happens.

    These are the only changes I made to the stock system which led to the refuse connection:
    Code:
    nano /etc/ssh/sshd_config
    
    RSAAuthentication yes
    PubkeyAuthentication yes
    PermitEmptyPasswords no
    PasswordAuthentication no
    ListenAddress <main.server.ip.address>
    Obviously, added the authorized_keys file to /.ssh folder
     
  3. Jimmy

    Jimmy Well-Known Member

    1,707
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    1:50 AM
    1.17.x
    MariaDB 10.3.x
    Code:
    grep 'listening' /var/log/secure
    Apr 19 03:38:10 stock sshd[838]: Server listening on 0.0.0.0 port 22.
    Apr 19 03:38:10 stock sshd[838]: Server listening on :: port 22.
    Apr 19 03:40:53 stock sshd[11202]: Server listening on 0.0.0.0 port 22.
    Apr 19 03:40:53 stock sshd[11202]: Server listening on :: port 22.
    Apr 18 21:41:01 nsXXXXXX sshd[XXXXXX]: Server listening on 0.0.0.0 port 22.
    Apr 18 21:41:01 nsXXXXXX sshd[XXXXXX]: Server listening on :: port 22.
    I wonder if I have to leave the ListenAddress 0.0.0.0 instead of replacing the 0.0.0.0 with my server IP.
    Code:
    ListenAddress 0.0.0.0
    ListenAddress <main.server.ip.address>
     
  4. Jimmy

    Jimmy Well-Known Member

    1,707
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    1:50 AM
    1.17.x
    MariaDB 10.3.x
    After adding
    Code:
    ListenAddress 0.0.0.0
    ListenAddress <main.server.ip.address>
    Doesn't look like the server IP is showing up.
    Code:
    grep 'listening' /var/log/secure
    Apr 19 03:38:10 stock sshd[838]: Server listening on 0.0.0.0 port 22.
    Apr 19 03:38:10 stock sshd[838]: Server listening on :: port 22.
    Apr 19 03:40:53 stock sshd[11202]: Server listening on 0.0.0.0 port 22.
    Apr 19 03:40:53 stock sshd[11202]: Server listening on :: port 22.
    Apr 18 21:41:01 nsXXXXXX sshd[XXXXXX]: Server listening on 0.0.0.0 port 22.
    Apr 18 21:41:01 nsXXXXXX sshd[XXXXXX]: Server listening on :: port 22.

    UPDATE:
    Removed ListenAddress 0.0.0.0 and rebooted. Tried to log back in and got connection refused. Logged in via IPMI and got the same results to the grep
    Code:
    grep 'listening' /var/log/secure
    Apr 19 03:38:10 stock sshd[838]: Server listening on 0.0.0.0 port 22.
    Apr 19 03:38:10 stock sshd[838]: Server listening on :: port 22.
    Apr 19 03:40:53 stock sshd[11202]: Server listening on 0.0.0.0 port 22.
    Apr 19 03:40:53 stock sshd[11202]: Server listening on :: port 22.
    Apr 18 21:41:01 nsXXXXXX sshd[XXXXXX]: Server listening on 0.0.0.0 port 22.
    Apr 18 21:41:01 nsXXXXXX sshd[XXXXXX]: Server listening on :: port 22.

    UPDATE2
    Figured it out. For some reason a reboot doesn't make the necessary changes to the sshd. Have to restart sshd after the changes are made.
     
    Last edited: Apr 19, 2017
  5. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:50 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    normal procedure after editing /etc/ssh/sshd_config ;)
     
  6. Jimmy

    Jimmy Well-Known Member

    1,707
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    1:50 AM
    1.17.x
    MariaDB 10.3.x
    I think I found the problem. For some reason when I reboot the machine, something is happening preventing me for logging in - "connection refused". Once I login through IPMI and restart sshd I am able to login. Not sure if this is a bug in the system or what.

    Stock Centos 7 system.
     
  7. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:50 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    check if sshd service is set to restart automatically on boot up (should by default)
    Code (Text):
    systemctl is-enabled sshd
    

    example equivalent to chkconfig sshd on centos 6.x
    Code (Text):
    systemctl is-enabled sshd
    enabled
    

    if not enabled for auto restart enable it
    Code (Text):
    systemctl enable sshd
    

    or
    Code (Text):
    chkconfig sshd on
    

    also check sshd status
    Code (Text):
    systemctl status sshd
    

    Code (Text):
    systemctl status sshd
    ● sshd.service - OpenSSH server daemon
       Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
       Active: active (running) since Wed 2017-04-19 00:57:04 UTC; 11h ago
         Docs: man:sshd(8)
               man:sshd_config(5)
     Main PID: 25890 (sshd)
       CGroup: /system.slice/sshd.service
               └─25890 /usr/sbin/sshd -D
    
     
  8. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:50 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Confirmed by OVH support typo
     
  9. Jimmy

    Jimmy Well-Known Member

    1,707
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    1:50 AM
    1.17.x
    MariaDB 10.3.x
    Interesting result after boot.

    Code:
    # systemctl status sshd
    Code:
    sshd.service - OpenSSH server daemon
    Loaded: loaded (/usr/lib/systemd/system/sshd.service;  enabled; vendor preset: enabled)
    Active:  failed (Result: exit-code) since 11h ago
    Docs:  man:sshd(8)
        man:sshd_config(5)
    Process:  789 ExecStart=/usr/sbin/sshd -D $OPTIONS (code=exited, status=255)
    Main PID:  789 (code=exited, status=255)
    
    systemd[1]:  Stating OpenSSH server daemon...
    sshd[789]: error:  Bind to port 22 on XXX.XXX.XXX.XXX failed:  Cannot assign requested address.
    sshd[789]: fatal:  Cannot bind any address.
    systemd[1]: sshd.service:  main process exited, code=exited, status=255/n/a
    systemd[1]: Failed to start OpenSSH server daemon.
    systemd[1]: Unit sshd.service entered failed state.
    systemd[1]: sshd.service failed.
    Login via IPMI and restart sshd via service sshd restart.
    Code:
    # systemctl status sshd
    Everything is fine and the IP is listening on XXX.XXX.XXX.XXX port 22.

    So, after reboot I get the error and have to restart sshd to get it working again.
     
  10. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:50 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    did you add the ip address properly Network IP Aliasing | OVH Docs ?

    make sure the ip address is correct and doesn't have a typo etc
     
  11. Jimmy

    Jimmy Well-Known Member

    1,707
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    1:50 AM
    1.17.x
    MariaDB 10.3.x
    I'm using the main server IP address. All that I've done to this box is add nano and edit the sshd_config file. The only interface on this machine is eth0 and is populated by OVH on install.

    I just checked eth0 and it's setup correctly for being the main IP. This should work fine... or I'm going crazy... one of the two.
     
  12. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:50 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
  13. Jimmy

    Jimmy Well-Known Member

    1,707
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    1:50 AM
    1.17.x
    MariaDB 10.3.x
    Dam ListenAddress! Thanks for searching for / finding that bug information. :) I was searching last night for an issue and couldn't find anything about using ListenAddress.

    Yea, going to skip this for now so I can move onto actually getting the server setup.
     
  14. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:50 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    well ListenAddress probably not needed anyway, CSF Firewall secures sshd port anyway :)
     
  15. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:50 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x

    Attached Files:

  16. BamaStangGuy

    BamaStangGuy Premium Member Premium Member

    651
    189
    43
    May 25, 2014
    Ratings:
    +264
    Local Time:
    12:50 AM
    Can you go into detail on what you needed to do? Looking at a new one with NVMe and want to use original kernel.
     
  17. Jimmy

    Jimmy Well-Known Member

    1,707
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    1:50 AM
    1.17.x
    MariaDB 10.3.x
    I was having an issue in the beginning, but it appears that they must have modified their centos image. I've reinstalled several times and haven't had an issue since using the org kernel. You should be good to go.

    Note: I'm using the 1.2TB NVMe, so I know everything works with that model.

    Worst comes to worst, you can always install stock centos from an iso in the IPMI, you just have to attach a virtual device linked to the iso on your desktop.
     
  18. elargento

    elargento Member

    348
    17
    18
    Jan 4, 2016
    Ratings:
    +43
    Local Time:
    3:50 AM
    10
    What at the reasons to use the original kernel rather than ovh kernel? Ovh kernel should be more tested in OVH servers. I think I've read @eva2000 were recommended Linode kernel for linode servers
     
  19. Jimmy

    Jimmy Well-Known Member

    1,707
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    1:50 AM
    1.17.x
    MariaDB 10.3.x
    @eva2000 recommends using the org kernel on OVH. I believe there is a warning notice if you try to install CMM using the OVH kernel. @eva2000 would know more why.
     
  20. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:50 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    OVH custom kernel has some restrictions that prevent normal server operation for Centmin Mod installed software. It ain't just Centmin Mod installed software but other non-Centmin Mod stuff would have restrictions. Best to use CentOS original kernel.