Error: “bind to port 22 on 0.0.0.0 failed: Address already in use”

Yesterday I setup a Linux Centos server which then having problem with connection refused/dropped when I configuring it via SSH.I check the sshd log file, and see “Error: bind to port 22 on 0.0.0.0 failed: Address already in use” error message. Some web page I read said that it’s because IPv4 and IPv6 are both configured to listen SSH, we need to turn off one. Here is how to fix it:

Look for

If you use IPv4, uncomment this line:

So it look like this:

For IPv6, uncomment this one:

So it look like this:

4 thoughts on “Error: “bind to port 22 on 0.0.0.0 failed: Address already in use””

Leave a Reply

Your email address will not be published. Required fields are marked *