Skip to content

Instantly share code, notes, and snippets.

@EndruK
Created December 15, 2017 14:48
Show Gist options
  • Save EndruK/2e0c5e7aef6693ab8acdeeb7a88bbc36 to your computer and use it in GitHub Desktop.
Save EndruK/2e0c5e7aef6693ab8acdeeb7a88bbc36 to your computer and use it in GitHub Desktop.
How to SSH with public key and disabled standard password login
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