#590578 openssh-server: exits if ListenAddress is not available for binding

Package:
openssh-server
Source:
openssh
Description:
secure shell (SSH) server, for secure access from remote machines
Submitter:
Paul Wise
Date:
2021-09-22 04:30:30 UTC
Severity:
normal
#590578#5
Date:
2010-07-27 13:54:46 UTC
From:
To:
The OpenSSH server exits with a fatal error if the ListenAddress is not
available for binding. In my use-case (ssh between my phone and laptop
using Ethernet over USB) I need SSH to be always running and bind to the
appropriate address as new interfaces become available and de-bind as
they disappear. I don't want SSH exposed to the WiFi and Ethernet
interfaces on my laptop so I use ListenAddress in sshd_config, the
reject option in dhclient.conf and a static IP on the USB connection so
that rogue networks can't get in on SSH. Probably the best solution to
this is to split ListenAddress add an AllowListenAddress and rename
ListenAddress to RequireListenAddress.

pabs@chianamo:~$ ifconfig usb0
usb0: error fetching interface information: Device not found
pabs@chianamo:~$ pgrep sshd
pabs@chianamo:~$ grep ^Listen /etc/ssh/sshd_config
ListenAddress 192.168.0.200
pabs@chianamo:~$ sudo /etc/init.d/ssh start
Starting OpenBSD Secure Shell server: sshd.
pabs@chianamo:~$ pgrep sshd
pabs@chianamo:~$ sudo grep sshd /var/log/auth.log
Jul 27 09:36:03 chianamo sshd[8050]: error: Bind to port 2222 on 192.168.0.200 failed: Cannot assign requested address.
Jul 27 09:36:03 chianamo sshd[8050]: fatal: Cannot bind any address.
Jul 27 09:36:44 chianamo sudo:     pabs : TTY=pts/1 ; PWD=/home/pabs ; USER=root ; COMMAND=/bin/grep sshd /var/log/auth.log

#590578#10
Date:
2021-09-22 04:20:13 UTC
From:
To:
Hello,

Good morning,

We have gone through your samples from a partner and Here is our  Order
List. Please do bear in mind that we are very much in  need of this
order, quote your competitive prices.

Kindly send the Order confirmation.

Your early reply will be much appreciated.

Best Regards,

Maryanah Erwin.

PT FINDORA INTERNUSA

Jln Pahlawan 66 Kec. Arjawinangun

45162 CIREBON West-Java INDONESIA

tel : +62 231 357334

fax: +62 231 357260

email: marketing@findora.com