[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2021-11-03 Thread Sergio Durigan Junior
It seems like I can't add another Debian bug reference to this bug, but
I found this one to be a very interesting read:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=982950

In a nutshell, although the "After=network-online.target" change can be
considered to be a workaround here, I find it quite unlikely that the
Debian maintainer (and therefore Ubuntu) will accept a patch proposing
to use this statement in openssh's systemd service file.  You can find a
rationale by Colin in the bug I mentioned above.

In a way, I think this bug is similar to
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1918141, and we
still don't seem to have a good "silver bullet" for these cases...

** Bug watch added: Debian Bug tracker #982950
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=982950

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2021-08-20 Thread Bug Watch Updater
** Changed in: openssh (Debian)
   Status: Unknown => New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2021-08-01 Thread KarlGoetz
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=986761 another debian
report.

** Bug watch added: Debian Bug tracker #986761
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=986761

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2021-08-01 Thread KarlGoetz
cjwatson (if you're still watching) or other openssh uploaders - would
you accept a patch to adjust ssh service files default behaviour to
network-online instead of network ready? If yes I'll prepare a debdiff
for review.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2021-08-01 Thread KarlGoetz
Also duplicate https://bugzilla.redhat.com/show_bug.cgi?id=1352214

** Bug watch added: Red Hat Bugzilla #1096081
   https://bugzilla.redhat.com/show_bug.cgi?id=1096081

** Also affects: openssh (Fedora) via
   https://bugzilla.redhat.com/show_bug.cgi?id=1096081
   Importance: Unknown
   Status: Unknown

** Bug watch added: Debian Bug tracker #590578
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=590578

** Also affects: openssh (Debian) via
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=590578
   Importance: Unknown
   Status: Unknown

** Bug watch added: Red Hat Bugzilla #1352214
   https://bugzilla.redhat.com/show_bug.cgi?id=1352214

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2021-04-29 Thread That Man
I researched this issue for about 6+ hours or so and finally came across
this thread. I have been able to solve the issue thanks to this thread.


# ENVIRONMENT INFO:
Ubuntu 20.04.2 LTS (Focal Fossa)
OpenSSH_8.2p1 Ubuntu-4ubuntu0.2, OpenSSL 1.1.1f  31 Mar 2020


# PROBLEM:
Open /etc/ssh/sshd_config and add: "ListenAddress=192.168.5.123"
The IP address specified is the local IP of the Ethernet adapter on the 
motherboard.

# EXPECTED RESULT: Boot the server, and then be able to login to
the specified IP address via SSH from a remote workstation.

# ACTUAL RESULT: Boot the server, and I am unable to login to
the specified IP address via SSH from a remote workstation.

# NOTES: If I remove "ListenAddress=192.168.5.123" from
sshd_config, reboot the server, then I am able to login via SSH from a
remote workstation.

If the server is already on, and I am logged in via SSH,
and I add "ListenAddress=192.168.5.123" to sshd_config, and then I run
"sudo systemctl restart sshd", and then I run "sudo systemctl status
sshd", I see that sshd is listening to the IP address specified with no
errors. I am then able to logout/login of the SSH session successfully.

However, if I add "ListenAddress=192.168.5.123" to sshd_config, 
reboot the server, then I am unable to log into the server via SSH from a 
different workstation. When I check /var/log/auth.log I find this error:

Apr 29 08:09:45 user sshd[1395]: error: Bind to port 
12345 on 192.168.5.123 failed: Cannot assign requested address.
Apr 29 08:09:45 user sshd[1395]: fatal: Cannot bind any 
address.

This leads me to believe that sshd is attempting to bind
to the Ethernet adapter's IP address BEFORE the Ethernet adapter
receives its IP address from the DHCP server (I think). Thus resulting
in this fatal error.


## SOLUTION:
Open /etc/systemd/system/sshd.service and change:

FROM:

[Unit]
After=network.target auditd.service

TO:

[Unit]
After=network-online.target auditd.service

See this article for details: 
https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/#cutthecraphowdoimakesurethatmyservicestartsafterthenetworkisreallyonline

With this configuration in place, I add "ListenAddress=192.168.5.123" 
to sshd_config, reboot the server, and then I am successfully able to login via 
SSH from a remote workstation.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Re: [Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2021-02-27 Thread Jean-Marie Delapierre
Le 27/02/2021 à 08:39, Andy Igoshin a écrit :
> /etc/systemd/system/ssh.service.d/override.conf
>
> [Unit]
> After=network-online.target auditd.service
>
It has worked very well for me.

Thanks.

Regards

Jean-Marie

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2021-02-26 Thread Andy Igoshin
/etc/systemd/system/ssh.service.d/override.conf

[Unit]
After=network-online.target auditd.service

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2020-09-18 Thread Robie Basak
** Tags added: network-online-ordering

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2020-01-24 Thread nimish
Came across this issue on a system I'm rebuilding and spun up a VM
running 18.04.3 to test. It seems like I got it working consistently on
every reboot. I'll try and breakdown what I've tried and what worked.
Everyone & Dev's can let me know if they see any issues of setting it up
the way it's working.

First made a backup of the file /etc/systemd/system/sshd.service just in
case even though you could use systemctl revert ssh.service to revert
any changes.

What I've tried:

editing /etc/systemd/system/sshd.service and changing the following
lines from:

After=network.target auditd.service

to:

After=network-online.target
Wants=network-online.target

or to:

Requires=network-online.target
After=network-online.target
Wants=network-online.target

or to:

Requires=network-online.target auditd.service
After=network-online.target auditd.service
Wants=network-online.target auditd.service

or to:

Requires=whoopsie.service
After=whoopsie.service
Wants=whoopsie.service

What I was trying to see is which service I could have ssh start after
seeing as using the various network.service/targets were just not
working or consistent. Using whoopsie.service worked the first time I
rebooted but each reboot after that ssh failed to start.

I tried the following as well:

systemctl edit ssh.service and putting the above variations in that file
and the ssh.service still failed to start.


When looking at:

systemctl show ssh or systemctl show ssh |grep -C 10 "After" to get the
data I wanted to see.

I see the following "Before=" argument which has multi-user.target
included. When you look at what's in /etc/systemd/system/multi-
user.target.wants/ it includes links to ssh.service, networkd-
dispatcher.service, networking.service & NetworkManager.service.

Names=ssh.service
Requires=sysinit.target system.slice -.mount
WantedBy=multi-user.target
Conflicts=shutdown.target
Before=shutdown.target multi-user.target
After=system.slice systemd-journald.socket network.target sysinit.target 
-.mount auditd.service basic.target

>From the above data it looks like ssh.service is set to start before
multi-user.target?

So I set out to change that behavior:

I tried putting the following in systemctl edit ssh.service which did
not work

Requires=multi-user.target
Before=shutdown.target
After=multi-user.target
Wants=multi-user.target

Did systemctl revert ssh.service to revert to the original configs


Then I tried systemctl edit --full ssh.service and put

Requires=multi-user.target
Before=shutdown.target
After=multi-user.target
Wants=multi-user.target

reloaded the daemons systemctl daemon-reload. I don't think it totally
necessary to do this if you're going to reboot anyway but why not, no
harm.

Rebooted multiple times and now ssh starts on every reboot/boot.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2019-06-20 Thread Con
@ahasenack, I found this post (took plenty of Google foo) but it was
helpful.

For anyone else, 18.04 LTS STILL has this issue.  The following fixed
it:

After=network-online.target
Wants=network-online.target

These are in my [Unit] section at the top of
/etc/systemd/system/sshd.service


[Unit]
Description=OpenBSD Secure Shell server
After=network-online.target auditd.service
Wants=network-online.target
ConditionPathExists=!/etc/ssh/sshd_not_to_be_run

[Service]


I hope this is helpful to others!

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2019-05-15 Thread Andreas Hasenack
Just passing by to see if anything has changed. Would be good to know if
the workaround is effective for those affected.

-- 
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2019-05-15 Thread Andreas Hasenack
Just passing by to see if anything has changed. Would be good to know if
the workaround is effective for those affected.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2018-11-14 Thread Simon Déziel
Sorry, it should have read "After=network-online.target".

https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/#cutthecraphowdoimakesurethatmyservicestartsafterthenetworkisreallyonline

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2018-11-14 Thread Simon Déziel
@Rodman, as a workaround, maybe you could try to add an "After=systemd-
networkd-wait-online.service" clause in a drop-in snippet?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2018-11-14 Thread Rodman
This is still broken in 18.04 Server.  Setting the listen address fails
to load the SSHD daemon at boot time.  You have to have console access
and do a "service sshd restart" to fix.

How is this bug still here???

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2018-10-05 Thread The Marauder
10 years ago ... Same bug !

Incredible :(

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2018-03-08 Thread Andreas Hasenack
Upstream server about using IP_FREEBIND:
https://bugzilla.mindrot.org/show_bug.cgi?id=2512

** Bug watch added: OpenSSH Portable Bugzilla #2512
   https://bugzilla.mindrot.org/show_bug.cgi?id=2512

** Also affects: openssh via
   https://bugzilla.mindrot.org/show_bug.cgi?id=2512
   Importance: Unknown
   Status: Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2018-03-08 Thread Andreas Hasenack
Upstream server about using IP_FREEBIND:
https://bugzilla.mindrot.org/show_bug.cgi?id=2512

** Bug watch added: OpenSSH Portable Bugzilla #2512
   https://bugzilla.mindrot.org/show_bug.cgi?id=2512

** Also affects: openssh via
   https://bugzilla.mindrot.org/show_bug.cgi?id=2512
   Importance: Unknown
   Status: Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2018-01-02 Thread ChristianEhrhardt
Thanks for the confirmation Gennady.

Now that there is a suggested and confirmed solution, would anybody that 
personally requires (alway better to make an argument) this fix mind filing 
this in Debian as well to be changed in ./debian/systemd/ssh.service.
I'd think at least eventually we want to be in sync on this behavior.

@CJWatson - since you usually do the openssh uploads what do you think
about adding that for now on your next upload?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2017-12-30 Thread Gennady
Ubuntu 17.10
Changing network.target to network-online.target in 
/lib/systemd/system/ssh.service worked. I also added 
Wants=network-online.target (don't know if it's necessary but 
https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ suggests it)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2017-08-02 Thread Colin Watson
** Attachment removed: "CF03A0B90095673B.jpg"
   
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+attachment/4925374/+files/CF03A0B90095673B.jpg

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2017-07-14 Thread ChristianEhrhardt
As Seth mentioned in comment #13 likely network-online.target should be the 
solution.
@Owlbsidian - could you test and confirm with that as a fix as well?

A related fun quote from the systemd page about it:
"... please just fix your program to be friendly to dynamically changing 
network configuration. That way you will make your users happy because things 
just start to work, and you will get fewer bug reports ..."

Without that support you can still run into issues if e.g. you have a
manually added interface you depend on (no service target will help you
there). But that in turn would be an upstream feature request more than
anything else.

Anyway, as long as ssh doesn't support that we might want to finally tackle 
that issue to at least improve it. Now that systemd has more means to express 
"online".
Maybe even by directly fixing it in Debian.

Subscribing server to track and cjwatson for his opinion (actually I see
he is auto-subscribed to the pkg so he will see).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2017-07-13 Thread Owlbsidian
For me after changing network.target to network.service on
/usr/lib/systemd/system/sshd.service it started at the right time.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2017-05-15 Thread jowfdoijdfdwfwdf
This has been broken for almost 10 years, still broken in 16.10

It is useful to set sshd ListenAddress so ssh won't be available when
connected to a different network (laptop on a public wifi etc). However
with ListenAddress set, sshd always fails a rebooot/network disconnect.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2016-06-02 Thread ironstorm
This is still broken in 16.04 / Xenial.

I'm going to try using a root cronjob to catch and recover:

*/5 *  *   *   * if [ $(ps -ef | grep /usr/sbin/sshd | grep -v grep
| wc -l) -eq 0 ]; then /usr/sbin/service ssh start; fi

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2016-03-28 Thread Simon Déziel
Under systemd, if the ListenAddress is on an interface that is manually
brought up, the ifup script doesn't help. In that situation, the invoke-
rc.d reload/restart fails because the initial startup of sshd wasn't
successful.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2016-03-28 Thread Simon Déziel
Under systemd, if the ListenAddress is on an interface that is manually
brought up, the ifup script doesn't help. In that situation, the invoke-
rc.d reload/restart fails because the initial startup of sshd wasn't
successful.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2016-03-24 Thread ChristianEhrhardt
Since so many things changed since this - admittedly embarrassing old -
bug was reported I thought I retest it before the next LTS comes out.

I looked at the Xenial content and found stuff like:
Not only is it specified "After network.target", but on top there is 
/etc/network/if-up.d/openssh-server which is intended to restart openssh if 
later an iface comes up, there it would be able to rebind that IP.


I tested on containers first and it worked right away, setting ListenAddress 
and restarting.
But well in containers devices might be "up" at a different timing, but even in 
a KVM Guest, setting ListenAddress again it works just fine.
Mar 24 14:54:43 testxenial-ssh sshd[1293]: Server listening on 192.168.122.131 
port 22.

I wondered and wanted to make sure that the test is valid, so I spawned
trusty (LTS), vivid (last reported issue) and wily

But - for me - it was working on all of them - even with several retries
it was not even racy.

Therefore I wanted to ask for a retest - at least with Xenial if possible.
Also any detail about the test environment that was used would be great - 
especially by the last confirmation in vivid.
Does it have to be a special network card that might initialize slowly or 
anything like it?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2016-03-24 Thread ChristianEhrhardt
Since so many things changed since this - admittedly embarrassing old -
bug was reported I thought I retest it before the next LTS comes out.

I looked at the Xenial content and found stuff like:
Not only is it specified "After network.target", but on top there is 
/etc/network/if-up.d/openssh-server which is intended to restart openssh if 
later an iface comes up, there it would be able to rebind that IP.


I tested on containers first and it worked right away, setting ListenAddress 
and restarting.
But well in containers devices might be "up" at a different timing, but even in 
a KVM Guest, setting ListenAddress again it works just fine.
Mar 24 14:54:43 testxenial-ssh sshd[1293]: Server listening on 192.168.122.131 
port 22.

I wondered and wanted to make sure that the test is valid, so I spawned
trusty (LTS), vivid (last reported issue) and wily

But - for me - it was working on all of them - even with several retries
it was not even racy.

Therefore I wanted to ask for a retest - at least with Xenial if possible.
Also any detail about the test environment that was used would be great - 
especially by the last confirmation in vivid.
Does it have to be a special network card that might initialize slowly or 
anything like it?

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2016-01-20 Thread karl forner
Would be nice if it was fixed once for all. This is a critical bug when
your server is in a distant location, and you cannot log on it because
of that bug.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2016-01-20 Thread karl forner
Would be nice if it was fixed once for all. This is a critical bug when
your server is in a distant location, and you cannot log on it because
of that bug.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2015-05-19 Thread Martin Pitt
** Tags removed: systemd-boot

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2015-05-19 Thread Martin Pitt
** Tags removed: systemd-boot

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2015-05-11 Thread Dirk Schuster
same in vivid

Mai 11 12:40:44 pcds systemd[1]: Unit ssh.service entered failed state.
Mai 11 12:40:44 pcds systemd[1]: ssh.service failed.
Mai 11 12:40:44 pcds systemd[1]: ssh.service holdoff time over, scheduling ...t.
Mai 11 12:40:44 pcds systemd[1]: start request repeated too quickly for ssh...ce
Mai 11 12:40:44 pcds systemd[1]: Failed to start OpenBSD Secure Shell server.
Mai 11 12:40:44 pcds systemd[1]: Unit ssh.service entered failed state.
Mai 11 12:40:44 pcds systemd[1]: ssh.service failed.

For the first time this error was reported 7 years ago. And it lives on
and on and on ...

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2015-05-11 Thread Dirk Schuster
same in vivid

Mai 11 12:40:44 pcds systemd[1]: Unit ssh.service entered failed state.
Mai 11 12:40:44 pcds systemd[1]: ssh.service failed.
Mai 11 12:40:44 pcds systemd[1]: ssh.service holdoff time over, scheduling ...t.
Mai 11 12:40:44 pcds systemd[1]: start request repeated too quickly for ssh...ce
Mai 11 12:40:44 pcds systemd[1]: Failed to start OpenBSD Secure Shell server.
Mai 11 12:40:44 pcds systemd[1]: Unit ssh.service entered failed state.
Mai 11 12:40:44 pcds systemd[1]: ssh.service failed.

For the first time this error was reported 7 years ago. And it lives on
and on and on ...

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


Re: [Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2015-05-11 Thread Simon Déziel
Wouldn't it be possible to have sshd use IP_FREEBIND so that it can
bind an IP that has not materialized yet?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2015-05-11 Thread Simon Déziel
Wouldn't it be possible to have sshd use IP_FREEBIND so that it can
bind an IP that has not materialized yet?

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2015-05-11 Thread Seth Arnold
Changing the ssh service file to use network-online.target should also
work; see
http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ for more
information.

** Tags added: systemd-boot

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2015-05-11 Thread Seth Arnold
Changing the ssh service file to use network-online.target should also
work; see
http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ for more
information.

** Tags added: systemd-boot

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2013-11-01 Thread Dirk Schuster
same problem with package openssh-server of Ubuntu 13.10 (Saucy)

error messages in /var/log/auth.log after boot process:
Nov  1 17:31:46 pc sshd[1209]: error: Bind to port xxx on yyy.yyy.y.y failed: 
Cannot assign requested address.
Nov  1 17:31:46 pc sshd[1209]: fatal: Cannot bind any address.

reason:
/etc/ssh/sshd_config uses ListenAddress option

solution:
in /etc/init/ssh.conf
change line
start on runlevel [2345]
to
start on runlevel [2345] and net-device-up IFACE!=lo

message in /var/log/auth.log after boot process now:
Nov  1 17:39:20 pc sshd[1518]: Server listening on yyy.yyy.y.y port xxx.


What needs to be done, so that the solution will get into the package? Could 
anybody help?

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2013-11-01 Thread Dirk Schuster
same problem with package openssh-server of Ubuntu 13.10 (Saucy)

error messages in /var/log/auth.log after boot process:
Nov  1 17:31:46 pc sshd[1209]: error: Bind to port xxx on yyy.yyy.y.y failed: 
Cannot assign requested address.
Nov  1 17:31:46 pc sshd[1209]: fatal: Cannot bind any address.

reason:
/etc/ssh/sshd_config uses ListenAddress option

solution:
in /etc/init/ssh.conf
change line
start on runlevel [2345]
to
start on runlevel [2345] and net-device-up IFACE!=lo

message in /var/log/auth.log after boot process now:
Nov  1 17:39:20 pc sshd[1518]: Server listening on yyy.yyy.y.y port xxx.


What needs to be done, so that the solution will get into the package? Could 
anybody help?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2013-10-24 Thread Dirk Schuster
I tested on 12.10.

Unfortunately the solution from Claus interferes with the network
manager.  On my 12.10 system I wasn't able to handle the eth0 by the
network manager any more.

As I don't like arvitrary sleep times, I figured out a solution just
changing the start on line in /etc/init/ssh. It works very well for me
in 12.10..

I add this patch in a moment. It would be fine if someone would test it
and confirm it.

Users of other ubuntu versions might have to change the line
accordingly.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2013-10-24 Thread Dirk Schuster
** Patch added: ubuntu 12.10 patch /etc/init/ssh.conf without sleep
   
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+attachment/3889510/+files/ssh.conf_12.10.patch

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2013-10-24 Thread Dirk Schuster
I tested on 12.10.

Unfortunately the solution from Claus interferes with the network
manager.  On my 12.10 system I wasn't able to handle the eth0 by the
network manager any more.

As I don't like arvitrary sleep times, I figured out a solution just
changing the start on line in /etc/init/ssh. It works very well for me
in 12.10..

I add this patch in a moment. It would be fine if someone would test it
and confirm it.

Users of other ubuntu versions might have to change the line
accordingly.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2013-10-24 Thread Dirk Schuster
** Patch added: ubuntu 12.10 patch /etc/init/ssh.conf without sleep
   
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+attachment/3889510/+files/ssh.conf_12.10.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2011-07-29 Thread Claus Allweil
I have fixed this problem for me in /etc/network/interfaces

auto eth0
iface eth0 inet dhcp
  up service ssh start

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2011-07-29 Thread Claus Allweil
I have fixed this problem for me in /etc/network/interfaces

auto eth0
iface eth0 inet dhcp
  up service ssh start

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2011-06-09 Thread ilf
Three years and six releases later, this is still present :(

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2011-06-09 Thread ilf
Three years and six releases later, this is still present :(

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/216847

Title:
  sshd will not start at boot if ListenAddress is set, because network
  interface is not yet up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2010-10-16 Thread KBios
Adding random sleeps is usually not the best possible solution, as the
required delay varies between systems (for example, when using a network
bridge). Maybe depending on net-device-up would be better.

-- 
sshd will not start at boot if ListenAddress is set, because network interface 
is not yet up
https://bugs.launchpad.net/bugs/216847
You received this bug notification because you are a member of Ubuntu
Server Team, which is a direct subscriber.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2010-10-16 Thread KBios
Adding random sleeps is usually not the best possible solution, as the
required delay varies between systems (for example, when using a network
bridge). Maybe depending on net-device-up would be better.

-- 
sshd will not start at boot if ListenAddress is set, because network interface 
is not yet up
https://bugs.launchpad.net/bugs/216847
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2010-09-24 Thread Brian Murray
** Tags added: patch

-- 
sshd will not start at boot if ListenAddress is set, because network interface 
is not yet up
https://bugs.launchpad.net/bugs/216847
You received this bug notification because you are a member of Ubuntu
Server Team, which is a direct subscriber.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2010-09-24 Thread Brian Murray
** Tags added: patch

-- 
sshd will not start at boot if ListenAddress is set, because network interface 
is not yet up
https://bugs.launchpad.net/bugs/216847
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2010-09-23 Thread Greg Porterfield
I'm having this exact symptom but in a different environment:   Ubuntu
10.04 Lucid Server.

After configuring /etc/ssh/sshd_config to have a specific ListenAddress
instead of 0.0.0.0, the ssh daemon consistently fails to start at boot
time.Errors from /var/log/auth.log:

Sep 23 14:26:45 a02-gsp sshd[697]: error: Bind to port 22 on 10.100.50.19 
failed: Cannot assign requested address.
Sep 23 14:26:45 a02-gsp sshd[697]: fatal: Cannot bind any address.

And errors in /var/log/syslog immediately after boot:

Sep 23 14:26:45 a02-gsp init: ssh main process (739) terminated with status 255
Sep 23 14:26:45 a02-gsp init: ssh main process ended, respawning
Sep 23 14:26:45 a02-gsp init: ssh main process (744) terminated with status 255
Sep 23 14:26:45 a02-gsp init: ssh respawning too fast, stopped

So this appears to be the same problem, but the root cause would seem to
be upstart in this case.Since /etc/init/ssh.conf says start on
filesystem, sshd is started before the network interfaces are
configured and fails to bind to the specific address that isn't
configured yet.

I've implemented the following workaround which seems to be working
well:   changed the start event in ssh.conf to start on started
network-interface and added a sleep 3 in the pre-start script (see
attached patch).   Without the sleep to wait for the interface to be
configured, sshd would still fail to start some of the time.

If this would be more appropriate as a new bug specific to Lucid Server
I'll be happy to open a new one.



** Patch added: patch with my changes to /etc/init/ssh.conf
   
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+attachment/1629304/+files/ssh.conf.patch

-- 
sshd will not start at boot if ListenAddress is set, because network interface 
is not yet up
https://bugs.launchpad.net/bugs/216847
You received this bug notification because you are a member of Ubuntu
Server Team, which is a direct subscriber.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2010-09-23 Thread Greg Porterfield
I'm having this exact symptom but in a different environment:   Ubuntu
10.04 Lucid Server.

After configuring /etc/ssh/sshd_config to have a specific ListenAddress
instead of 0.0.0.0, the ssh daemon consistently fails to start at boot
time.Errors from /var/log/auth.log:

Sep 23 14:26:45 a02-gsp sshd[697]: error: Bind to port 22 on 10.100.50.19 
failed: Cannot assign requested address.
Sep 23 14:26:45 a02-gsp sshd[697]: fatal: Cannot bind any address.

And errors in /var/log/syslog immediately after boot:

Sep 23 14:26:45 a02-gsp init: ssh main process (739) terminated with status 255
Sep 23 14:26:45 a02-gsp init: ssh main process ended, respawning
Sep 23 14:26:45 a02-gsp init: ssh main process (744) terminated with status 255
Sep 23 14:26:45 a02-gsp init: ssh respawning too fast, stopped

So this appears to be the same problem, but the root cause would seem to
be upstart in this case.Since /etc/init/ssh.conf says start on
filesystem, sshd is started before the network interfaces are
configured and fails to bind to the specific address that isn't
configured yet.

I've implemented the following workaround which seems to be working
well:   changed the start event in ssh.conf to start on started
network-interface and added a sleep 3 in the pre-start script (see
attached patch).   Without the sleep to wait for the interface to be
configured, sshd would still fail to start some of the time.

If this would be more appropriate as a new bug specific to Lucid Server
I'll be happy to open a new one.



** Patch added: patch with my changes to /etc/init/ssh.conf
   
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/216847/+attachment/1629304/+files/ssh.conf.patch

-- 
sshd will not start at boot if ListenAddress is set, because network interface 
is not yet up
https://bugs.launchpad.net/bugs/216847
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2010-05-09 Thread Colin Watson
** Summary changed:

- sshd will not start at boot
+ sshd will not start at boot if ListenAddress is set, because network 
interface is not yet up

** Visibility changed to: Public

-- 
sshd will not start at boot if ListenAddress is set, because network interface 
is not yet up
https://bugs.launchpad.net/bugs/216847
You received this bug notification because you are a member of Ubuntu
Server Team, which is a direct subscriber.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up

2010-05-09 Thread Colin Watson
** Summary changed:

- sshd will not start at boot
+ sshd will not start at boot if ListenAddress is set, because network 
interface is not yet up

** Visibility changed to: Public

-- 
sshd will not start at boot if ListenAddress is set, because network interface 
is not yet up
https://bugs.launchpad.net/bugs/216847
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs