SSHD failing on restart

Ed Greshko Ed.Greshko at greshko.com
Sat Jun 9 13:09:15 UTC 2012


On 06/09/2012 08:53 PM, Andrew Gray wrote:
> Hi  
>
> the sshd.service is enabled and is shown starting at the bottom of
> "boot.log" but "secure" show it failing to bind to the PC IP address !
>
>
>> [^[[1;32m  OK  ^[[0m] Started OpenSSH server daemon.
>> [^[[1;32m  OK  ^[[0m] Started Samba SMB Daemon.
>>          Starting CUPS Printing Service...
>> [^[[1;32m  OK  ^[[0m] Started CUPS Printing Service.
>> [^[[1;32m  OK  ^[[0m] Started Sendmail Mail Transport Agent.
>>          Starting Sendmail Mail Transport Client...
>>          Starting Daemon for managing, installing and generating color profiles...
> /var/log/secure shows it can't bind:-
>
>> linuxmail sshd[804]: error: Bind to port 22 on 192.168.191.9 failed: Cannot assign requested address.
>> linuxmail sshd[804]: fatal: Cannot bind any address.
> /var/log/messages shows it exiting ?:- 
>
>> linuxmail systemd[1]: sshd.service: main process exited, code=exited, status=255
>> linuxmail systemd[1]: Unit sshd.service entered failed state.
> Yet when I login I can restart sshd.service and it will bind to port 22 on 192.168.191.9 and keeps running.
>
> No firewall is running and selinux is in permissive mode 
> It is not the fastest machine Atlon 1200+ 1GB RAM  
> Kernel 3.4.0-1.fc17.i686 #1 SMP 
>
> Its my backup server and I need sshd running if it was remote I would be scuppered ! 
>
> Why is it failing to bind to the IP address on startup ?
>
>

It sort of sounds like something else has port 22 as Tom has suggested.  But, if you
are able to start it after the system is up that would mean whatever had the port has
released it.  Kind of odd.

Some questions....

What type of network card?  Wired/Wireless?

Is the IP address setup as static, or is the system getting it via DHCP?

When you start the service....what are the resulting lines in log/secure?

-- 
Never be afraid to laugh at yourself, after all, you could be missing out on the joke
of the century. -- Dame Edna Everage


More information about the users mailing list