Tutorial for OS X local certificates and Shared Hosting

I’m pasting it, together with -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY-----

I’ve changed it to -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY-----

I’ve also tried adding a blank line at the end.

Still getting Error: The Key is invalid.

Just a quick check … is the private key valid ?

openssl rsa -in private.key -check

should give you an OK (or not) at the top.

1 Like

I entered the following in terminal: openssl rss -in privkey1.pem -check

It showed:

RSA key ok
writing RSA key

followed by the key

it looked different than viewing the key from the privkey1.pm file

I copy/pasted the key that showed after the openssl command, now it’s working. Certificate imported successfully. Thank you!

1 Like

This method worked fine for me after a few attempts but when I uploaded my Certificate and Key, I had to do a Certificate Signing Request through my host and it all seemed to go fine but when I go to the site I get:

This site can’t provide a secure connection

www.XXXXXXX.com sent an invalid response.

The host thinks it’s a certificate error.

Has anyone seen this when generating your cert with this method?


I ran into problems on the third step “Now you begin with creating the certificates locally by defining key size and the domains:./letsencrypt-auto --debug cetonly -a manual -rsa-key-size 4096 -d [domain] -d www.[domain]

Using Mac OS El Capitan.

Got the following errors:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire’: cannot load such file – mach (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require' from /usr/local/Library/Homebrew/extend/pathname.rb:2:in<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire’
from /usr/local/Library/Homebrew/global.rb:3:in <top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire’
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require' from /usr/local/Library/brew.rb:15:in'`

Does anyone know what this is all about?

step 3 didn’t work for me
I using ubuntu
in letsencrypt I run this comand
./letsencrypt-auto certonly -a manual --rsa-key-size 4096 -d yourdomain.com -d www.yourdomain.com
but didn’t work display error letsencrypt-auto: command not found
can anyone help

You are replying to an old thread about OSX (lots has changed since then) and you are running ubuntu (not OSX). I’d suggest ideally starting a new thread with your issue.

Alternatively, if you don’t want to start a new thread, please tell us about your system, how you installed certbot / letsencrypt etc.

actualy I have intall SSL with shared hosting website
I follow this article

So what specific issue do you have ? and what commands di you run in order to get there ?

tried this on both windows(my pc) & ubuntu(aws ubuntu server)
step1 - run command
git clone https://github.com/letsencrypt/letsencrypt
done successful

step 2 - run command
letsencrypt certonly --manual --email admin@example.com -d example.com -d www.example.com
with my domain name
but didn’t work display error
letsencrypt-auto: command not found

If you have done a git clone, then you need to change into the letsencrypt directory ( cd letsencrypt )
Then include the path in front of the command ( ./letsencrypt certonly … on linux )

Hey, thanks for this great article. I wanted to tell you I created a french tutorial based on this one at https://mikaoelitiana.name/fr/creer-certificat-ssl-lets-encrypt-hebergement-partage/

1 Like

Hey there. I had some trouble updating my certificate. I used the same command as for creating a new one but the certificate on the webhost is not correctly updated when I upload new files there. Am I missing something?