Created
December 15, 2017 14:48
-
-
Save EndruK/2e0c5e7aef6693ab8acdeeb7a88bbc36 to your computer and use it in GitHub Desktop.
How to SSH with public key and disabled standard password login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host <-> Client | |
- Client: gen RSA key | |
- Host install openssh-server | |
- copy client-rsa.pub to host | |
- insert pub key to ~/.ssh/authorized_keys | |
- change /etc/ssh/sshd_config: | |
RSAAuthentication yes | |
PublicKeyAuthentication yes | |
PasswordAuthentication no #disables non-rsa-key-authentication | |
- on host: sudo systemctl reload ssh.service | |
- reconnect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment