The ssh daemon output an error "Bind to port 22 on xxxx:xxxx:xxxx:xxxx::xxx failed: Address already in use" on starting it

Solution Unverified - Updated -

Issue

  • The ssh daemon output the following error into /var/log/secure on starting it.
Dec 10 14:32:27 testmachine sshd[2638]: error: Bind to port 22 on xxxx:xxxx:xxxx:xxxx::xxx failed: Address already in use.
  • We have a ListenAddress configuration in /etc/ssh/sshd_config as below.
ListenAddress testmachine
ListenAddress testmachine.ipv6
  • Also, we have the following entries in /etc/hosts
192.168.100.1  testmachine testmachine.ipv4
xxxx:xxxx:xxxx:xxxx::xxx  testmachine testmachine.ipv6

Environment

Red Hat Enterprise Linux 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.