Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 476768 - net-misc/openssh: sshd does not give error/warning when something else is listening on the specified port
Summary: net-misc/openssh: sshd does not give error/warning when something else is lis...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-13 21:08 UTC by Agostino Sarubbo
Modified: 2018-06-19 14:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2013-07-13 21:08:47 UTC
When I want to run ssh on more than one port, e.g. 22 and 80, I start sshd and I don't receive warnings or errors if there is something like apache/nginx listening on the port 80, the result is sshd active only on the 22.

amd64box ~ # grep Port /etc/ssh/sshd_config 
Port 80
Port 22

amd64box ~ # netstat -tupan | grep "\:80"
tcp        0      0 192.168.1.3:80          0.0.0.0:*               LISTEN      2027/nginx: master

amd64box ~ # /etc/init.d/sshd restart
 * Stopping sshd ...                                                                                 [ ok ]
 * Starting sshd ...                                                                                 [ ok ]

amd64box ~ # netstat -tupan | grep ssh | grep LISTEN
tcp        0      0 192.168.1.3:22          0.0.0.0:*               LISTEN      2386/sshd
Comment 1 Michael Orlitzky gentoo-dev 2017-07-27 10:50:04 UTC
This probably needs to go upstream. The sshd daemon successfully starts even when it can't bind to both ports, so the init script has no way of knowing that your config wasn't 100% respected -- the daemon just looks "up".
Comment 2 SpanKY gentoo-dev 2018-06-19 14:31:49 UTC
i can't see us doing anything custom on the Gentoo side