Sshd Problem On Reboot

Home » CentOS » Sshd Problem On Reboot
CentOS 1 Comment

Hi list, I have a dedicated server managed through SSH and this morning I have upgraded my system from 7.2 to 7.3. After yum finished his work, and rebooted my server. After reboot I tried to log in with SSH and got “Connection refused”. I’ve noticed that all public services were online.

So I’ve contacted my provider to get access to the server and I’ve noticed that SSH was started with my specified port. I’ve tried to log locally on server and I got connection refused. So I’ve ridden logs and got:

error: bind to port MYPORT in LOCALIP failed: cannot assign requested address.

I’ve restarted sshd and problem “was solved”. Now I can’t try to replicate this error because I can’t reboot the server.

My addressing config is:

AddressFamily inet ListenAddress LOCALIP
#ListenAddress ::

What can cause this problem?

Thanks in advance.

One thought on - Sshd Problem On Reboot

  • Hi,

    It sounds like sshd is started before the network interface is available.

    When I upgraded from 7.2 to 7.3, rpc.gssd was also started before the network interfaces were available. This “just worked” from 7.0 up to
    7.2. I have no idea what causes this unexpected and unwanted change in behavior, or if a bug report has already been filed for it.

    As a (permanent) fix, I created
    /etc/systemd/system/rpc-gssd.service.d/network-online.conf containing:

    The same should work for sshd.service (or any network service for that matter) too.