Re: [SLUG] sshd fails to start

From: Eben King (eben01@verizon.net)
Date: Thu Oct 01 2009 - 16:23:01 EDT


On Wed, 30 Sep 2009, Eben King wrote:

> My address as assigned by DHCP (on my router) changed a few days ago, while
> the computer was down. So, I had to change the entry in the hosts file for
> itself.
>
> Possibly related is the fact that I can't get sshd to start. When I run
> "sudo /etc/init.d/ssh start" it says in /var/log/auth.log:
>
> Sep 30 23:17:29 pc sshd[30609]: Server listening on :: port 22.
> Sep 30 23:17:29 pc sshd[30609]: error: Bind to port 22 on 0.0.0.0 failed:
> Address already in use.
>
> But, I can't find out what's running on port 22. "sudo netstat -A inet -apn
> | grep :22" shows nothing. How can I find out what it is?

Found the solution. To quote lauterm on fedoraforum.org
(http://fedoraforum.org/forum/archive/index.php/t-26887.html):

,--
| SSH is starting. The first line is it starting and binding to port 22 on
| ::. Since it already has started, the second line where it tries to bind
| again to port 22 on 0.0.0.0 fails. The reason is that IPv6 and IPv4 are
| both enabled. SSH starts and binds on port 22 to all available IPv6 IPs
| (::). Then, it also tries to bind to all IPv4 IPs (0.0.0.0) in case IPv6
| is disabled, but the port is already bound. What I did to get rid of the
| error message was to add a ListenAddress line into /etc/ssh/sshd_config.
| For example, I only want SSH listening on my internal LAN so I add
| 'ListenAddress 192.168.1.3'.
'--

Worked for me.

-- 
-eben     QebWenE01R@vTerYizUonI.nOetP     royalty.mine.nu:81

Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." -- Albert Einstein ----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:44:57 EDT