mirror of
https://github.com/sahinakkaya/til.git
synced 2024-11-22 08:39:39 +01:00
TIL: Disabling password login
This commit is contained in:
parent
1e528faa5f
commit
76985ca774
15
ssh/disabling_password_login.md
Normal file
15
ssh/disabling_password_login.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
You can disable password login by editing `/etc/ssh/sshd_config` like this:
|
||||||
|
```
|
||||||
|
File: /etc/ssh/sshd_config
|
||||||
|
...
|
||||||
|
ChallengeResponseAuthentication no
|
||||||
|
PasswordAuthentication no
|
||||||
|
UsePAM no
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Before running the following command, **make sure** you have configured ssh keys properly and can login with them. Otherwise you won't be able to login remotely.
|
||||||
|
```
|
||||||
|
# you may need to run a different command based on your system
|
||||||
|
sudo systemctl restart ssh.service
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user