Question

How do I require a private key for SSH connection?

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

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hi,

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