0

I have an arch machine that I use as a local server. It used to be that every time I rebooted it (which was not often), I had to login and enter # dhcpcd net0. After that, I could ssh into it from my main computer just fine. Now I have done # systemctl enable [email protected] which works great for connecting to the internet, but has broken ssh. I can ping the server, but when I try to ssh in I get ssh: connect to host nas port 22: Connection refused. It only works once I login and run # systemctl restart sshd.

1
  • 1
    Read the journal entries for each of those services (dhcpcd & sshd) before and after you restart them.
    – jasonwryan
    Commented May 14, 2016 at 19:33

1 Answer 1

1

Run:

sudo systemctl enable sshd.socket

To enable service to run on boot.

4
  • I already ran systemctl enable sshd.service
    – Marcel
    Commented May 14, 2016 at 19:08
  • sshd doesn't use socket activation, it has a daemon process.
    – Bratchley
    Commented May 14, 2016 at 19:24
  • @Bratchley sshd CAN use socket activation (see -i switch for sshd. We have this possibility in RHEL and Fedora). But it does not change the fact that this does not generally answer the question nor does explain the behaviour of the command snippet.
    – Jakuje
    Commented May 14, 2016 at 21:33
  • This seems to have fixed it. Sorry for my previous comment.
    – Marcel
    Commented May 15, 2016 at 3:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .