I want to generate a OpenSSL .pem file to allow the remote login via ssh using .pem file at the place of password.
I am able to generate key as well as .crt and .pem file using the following
sudo openssl genrsa -des3 -out server.key 2048
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
openssl x509 -inform DER -outform PEM -in server.crt -out server.crt.pem
But the problem is that where I have to put it at server side or what changes I have to made in /etc/ssh/sshd_config file to allow remote login via ssh using .pem file.
I want that client connect my machine in the following manner.
ssh -i server_crt.pem username@my_ip
What changes exactly I have to make for the implementation.
Thanks