<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Sep 26, 2016 at 4:00 AM, Sergei Franco <span dir="ltr"><<a href="mailto:sergei.franco@gmail.com" target="_blank">sergei.franco@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>From further reading of documentation, please correct me if I am wrong, one way (not sure if correct) to start SSH during emergency mode is to edit /etc/systemd/system/sshd.<wbr>service and modify: <br><br>WantedBy=multi-user.target<br><br></div>to<br><br>WantedBy=multi-user.target emergency.target<br><br></div>Do I need to do anything with networking service or systemd will figure dependency of SSH service automatically? Any reason why emergency mode is not running SSH by default?</div></div></blockquote><div><br></div><div>Just WantedBy= is not enough; you need the actual symlink to happen, and `systemctl add-wants emergency.target sshd.service` is probably quicker than WantedBy+enable.</div><div><br></div><div>That said, I suspect the reason it's not done by default is that it also needs *networking*, and every distro has its own network setup services, some of them dragging in *other* services like udev or dbus, which is somewhat contrary to emergency.target being completely minimal... (Maybe there should be system-failure.target for this?)</div></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>