0

I want to set PubkeyAuthentication no in /etc/ssh/sshd_config, but someone should be excluded, i.e: John

2

1 Answer 1

1

Add something like this to your sshd_config:

Match User John
    PubkeyAuthentication yes

Don't forget to sudo systemctl reload sshd

4
  • [root@login03 ~]# systemctl restart sshd and [root@login03 ~]# sudo systemctl reload sshd
    – stack
    Mar 25, 2020 at 3:06
  • I got error message : Job for sshd.service invalid.
    – stack
    Mar 25, 2020 at 3:08
  • my configuration content is:PubkeyAuthentication no Match User John PubkeyAuthentication yes
    – stack
    Mar 25, 2020 at 3:12
  • Add something at the bottom of sshd_config, and it works OK!!
    – stack
    Mar 25, 2020 at 3:30

You must log in to answer this question.

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