Bug 120302 - sshd logs Bind to port 22 on failed error after start
Summary: sshd logs Bind to port 22 on failed error after start
Alias: None
Product: Fedora
Classification: Fedora
Component: openssh   
(Show other bugs)
Version: rawhide
Hardware: i386 Linux
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact:
: 122148 141119 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2004-04-07 17:07 UTC by Fred New
Modified: 2007-11-30 22:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-05-25 09:29:29 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Fred New 2004-04-07 17:07:00 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040207 Firefox/0.8

Description of problem:
In Fedora Core 2 test 1 and test 2, I have been noticing messages from
sshd in the LogWatch email to root.  I found the source of these
messages in /var/log/secure.  The are issued by sshd whenever the
system is booted:

Apr  7 19:50:28 kuldar sshd[1364]: Server listening on :: port 22.
Apr  7 19:50:28 kuldar sshd[1364]: error: Bind to port 22 on
failed: Address already in use.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Reboot the system
2. tail /var/log/secure


Actual Results:  The above error message.

Expected Results:  No error message.

Additional info:

The message doesn't seem to hurt anything, SSH still works.

Comment 1 Kaj J. Niemi 2004-04-08 06:26:26 UTC
This is because by default ssh attempts to bind itself both to a tcp
and a tcp6 port. Both "ListenAddress" and "ListenAddress ::"
are commented out in /etc/ssh/sshd_config.

If you are running a IPv4/IPv6 dual-stack system, uncommenting
"ListenAddress ::" will result in the same functionality but no error
messages. You will still be able to ssh to your system using both

I think this is a Linuxism as I have FreeBSD systems where both lines
are active in the config and there are no errors.

Comment 2 Tomas Mraz 2005-02-07 16:22:22 UTC
*** Bug 122148 has been marked as a duplicate of this bug. ***

Comment 3 Tomas Mraz 2005-02-10 10:23:50 UTC
*** Bug 141119 has been marked as a duplicate of this bug. ***

Comment 4 Tomas Mraz 2005-05-25 09:29:29 UTC
This cannot be solved safely in sshd. If you want to get rid of the message
uncomment one of the lines in the sshd_config depending on if you use IPv6 or not.

Comment 5 Jarkko 2005-11-16 07:15:11 UTC
I'm just wondering why sshd can't work when for example dovecot works.

I have this in my /etc/dovecot.conf:

# IP or host address where to listen in for connections. It's not currently
# possible to specify multiple addresses. "*" listens in all IPv4 interfaces.
# "[::]" listens in all IPv6 interfaces, but may also listen in all IPv4
# interfaces depending on the operating system. You can specify ports with
# "host:port".
imap_listen = [::]
pop3_listen = [::]

# IP or host address where to listen in for SSL connections. Defaults
# to above non-SSL equilevants if not specified.
imaps_listen = [::]
pop3s_listen = [::]

Comment 6 Tomas Mraz 2005-11-16 07:45:56 UTC
This is no different from specifying 'ListenAddress ::' in the
/etc/ssh/sshd_config. But when you disable IPv6 in kernel it probably won't work.

Note You need to log in before you can comment on or make changes to this bug.