Unable to configure sshd

I’m using Tumbleweed and trying to configure some options for sshd but I can’t seem to get them to take.

From what I understand with openSUSE there are default configs in /usr/etc/ssh which can be customised by copying to /etc/ssh and edited. However when I do this and restart sshd my changes don’t take effect.

I get the feeling I’m missing something obvious, can anyone help?

That is wrong, and not documented as such.

  • Yes the default config is in /usr/etc/ssh, and
  • your overrules go in /etc/ssh, but
  • you don’t need to copy, - undo that -, you have to add your snippets in /etc/ssh/sshd_config.d by creating f.e. Root,conf with PermitRootLogin prohibit-password

You may not need to, but you can and if you do, unless you have a syntax or permissions issue with the file, it will use that file.

My guess is there is a syntax or permissions issue with the new /etc/ssh/sshd_config file. Of course, without logs it is just a guess.

Thanks for the help, putting my overrides alone in a file in /etc/ssh/sshd_config.d/ does work. I can verify my changes being applied with sshd -T

I had read various bits online and this openSUSE docs page. How I read it it suggests that copying the whole config file to from /usr/etc to /etc and modifying would work:

If /etc/example.conf exists, /usr/etc/example.conf and /usr/etc/example.conf.d will be ignored, and only /etc/example.conf will be used. Which means this file needs to be a full copy.

If /etc/example.conf exists, /usr/etc/example.conf and /usr/etc/example.conf.d will be ignored, and only /etc/example.conf will be used. Which means this file needs to be a full copy.

But that didn’t work when I tried it I guess I misunderstood that. I’m still getting my head around the openSUSE ways of doing things.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.