What you've done is to create a key pair. This pair is actually two files. First file, the smaller one is the public key. The second file, the bigger one, is the private key.
You can use this key pair to connect to your server via ssh
. You've generated the key pair so you can trust it (as long as you keep the private part secure and not share it on public places). This is done so you can ssh
into your server more securely than using a password. This is done by placing the public part of the key on the server and keeping the private part on your computer (client).
Given that you generated the key pair you can trust it, but you cannot expect anyone else to trust it - so you cannot use it to provide https
for your domain.
If enabling https
for your domain is what you're trying to achieve (as it seems), you have to go through a Certificate Authority (CA). They give you a test (setting a DNS record / placing a file on your domain / receiving an email) before they generate the certificate for you. CAs are highly regulated and have strict operating conditions, so we take it as granted that they can be trusted by everyone.
There are paid CAs or free ones - like letsencrypt.org.
Also, keep in mind that you cannot use https
for IP addresses. Not without using some special config on your local device, but anyone else wouldn't be able to access your server via https://IP
.