Question

How do I require a private key for SSH connection?

Posted October 15, 2017 1.4k views
Server Optimization Security 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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

Hi,

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.

Submit an Answer