How do I require a private key for SSH connection?

October 15, 2017 1.2k views
Security Server Optimization Ubuntu 16.04

Hi there, newbie here. I followed a guide via digitalocean for generating an SSH key for my droplet server. However when I log into the server via putty it does not require me to authenticate with my key and I can log in without it. How do I make it so that my key is required for logging in via, say, Putty?

Thanks and best wishes

1 Answer


In order to make key necessary every time when you ssh you have to make key necessary in sshdconfig file which you would find in /etc/ssh/sshdconfig most probably.

Have another answer? Share your knowledge.