2

I've got the CoreOS running and I would like to remove the ability to login using passwords to the sshd. I went through the docs of the CoreOS in here, but I am quite new to the systemd. I went through the man page, but I am a bit lost on it. I know I have to create a dropin file inside /etc/system.d/system/, but I have no idea, in which section of the file, should I put the PasswordAuthentication no option. Since I work remotely, I don't want to screw up and not be able to login again...

I would be grateful for some guidance.

2

After having a chat on #coreos on freenode, I have learned the simples thing of all.

/etc is not read only, but sshd_config is a symlink to a file on /usr which is. I just had to remove the symlink and create the file by hand... eh.

-1

You have to edit the file /etc/ssh/sshd_config, you will find PasswordAuthentication there. Then restart the SSHD with systemctl restart sshd

  • Thanks @Stone but this is CoreOS and the file is on a read only partition, that's why I have to do this using a dropin file. – Krystian Jan 10 '18 at 9:31
  • Oh sorry, I was misread CoreOS to CentOS... :( – Stone Jan 10 '18 at 9:34
  • 1
    The configuration of /etc/ssh/sshd_config is in the very first configuration block of your linked instructions. Just add the line. – Gerald Schneider Jan 10 '18 at 9:35
  • @GeraldSchneider I'm sorry I don't understand. Sorry for my ignorance, but where do I add the line? – Krystian Jan 10 '18 at 9:40
  • @GeraldSchneider if your advice was to modify the /etc/ssh/sshd_config, then as stated before, this file is on a read only partition, and according to the docs, the only way to configure sshd after first boot is by using the dropin files: coreos.com/os/docs/latest/customizing-sshd.html What I miss is info on a section which I could use to pass the PasswordAuthentication option – Krystian Jan 11 '18 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.