Where do I put my SSH public key for a user in a virtual server?

Hi guys,

I was following this instruction.
I generated my SSH key pairs using ssh-keygen -t rsa -C “my@domain.com” on my Mac.

When I navigate to Webmin > Servers > SSH Server > Host SSH Keys, there’s no button for me to save my public key.

I’m running Nginx web server on Ubuntu 18.04.

Where and which file do I paste that public key to?

Hi,

You would put this to /$USERHOME/.ssh/authorized_keys.

Make sure that .ssh dir has permissions 700 and the authorized_keys file 600, otherwise it will fail to work (most likely).