I want to set PubkeyAuthentication no in /etc/ssh/sshd_config, but someone should be excluded, i.e: John
Asked
Active
Viewed 788 times
0
-
who can give me a help? – stack Mar 23 '20 at 08:42
-
3Does this answer your question? [How to block specific username from ssh?](https://askubuntu.com/questions/853252/how-to-block-specific-username-from-ssh) – muru Mar 23 '20 at 10:39
1 Answers
1
Add something like this to your sshd_config:
Match User John
PubkeyAuthentication yes
Don't forget to sudo systemctl reload sshd
BulletBob
- 1,750
- 2
- 7
- 12
-
[root@login03 ~]# systemctl restart sshd and [root@login03 ~]# sudo systemctl reload sshd – stack Mar 25 '20 at 03:06
-
-
my configuration content is:PubkeyAuthentication no Match User John PubkeyAuthentication yes – stack Mar 25 '20 at 03:12
-