home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] sshd config problem(?)

On Fri, Jun 09, 2006 at 05:51:20PM +0000, ed stuckems wrote:
> While looking through my logs the other day, I came across the following in 
> my logs ...
> 
> sshd[2115]: Server listening on :: port 22.
> sshd[2115]: error: Bind to port 22 on 0.0.0.0 failed: Address already in 
> use.
> 
> I have three questions:
> 
> (1) should this concern me?  My gut says yes but I don't know why.

Maybe ssh was "restarted" without being properly shut down.

> (2) why is ssh looking to bind to a port on 0.0.0.0 (why isn't is simply 
> looking to bind the port on the legal addresses for the machine, ie those 
> that I see when I do ifconfig -a?)

The 0.0.0.0 is often used to mean "bind to all IP addresses I have"
Most machines have at least 2 IPs, an external one and the loopback.
Instead of specifying all IPs, it is often convenient to use the 
wildchar IP. You can change this in the sshd config.

> (3) how do I find what app/server/etc has already done the bind of port 22 
> to 0.0.0.0?

'netstat -anlp' or 'lsof -i | grep LISTENING'

-Ross

replies

references