[CentOS] sshd problem on reboot

Sat Jan 7 10:38:19 UTC 2017
Robbert Eggermont <R.Eggermont at tudelft.nl>


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.



On 07-01-17 11:05, Alessandro Baggi wrote:
> 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:
> Port PORT
> AddressFamily inet
> ListenAddress LOCALIP
> ListenAddress
> #ListenAddress ::
> What can cause this problem?
> Thanks in advance.
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos