LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-06-2023, 11:04 AM   #1
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 195

Rep: Reputation: Disabled
problem converting pem to key


I received a new cert chain from godaddy. However, I am having an issue trying to convert the pem file to key file.

rhel 7.9 using apache

It's possible I am not using the right command:

openssl rsa -in file.pem - out file.key

I've checked the encoding, it is utf8. I've attempted to convert it to ascii, just to see what would happen.

The error when I try to convert is:

unable to load Private Key
140239624992656:error:0906D06C:PEM routines:PEM_read_bio:no start lineem_lib.c:707:Expecting: ANY PRIVATE KEY
(stdin)= d41d8cd98f00b204e9800998ecf8427e

Not sure what the problem is. I've converted before. Perhaps the pem file has errors in it?
 
Old 01-07-2023, 11:37 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,749

Rep: Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757
The command line, as posted, is clearly faulty.
#1 I suggest examining it carefully and consulting the man pages and/or instructions. In particular the site provided instructions. Carefully.
#2 Use the CODE tag when presenting code or command lines here.


The command in question was
Code:
openssl rsa -in file.pem - out file.key
which appears to have a space between "-" and "out".
 
Old 01-07-2023, 01:08 PM   #3
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 195

Original Poster
Rep: Reputation: Disabled
I was using the command right, I just typed it here, incorrectly.
In the end, I just made a new key and csr, which I then sent the csr to GD for new crts.
 
Old 01-08-2023, 09:41 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,368

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
This is a good site for showing how to examine & manipulate certs etc https://www.madboa.com/geek/openssl/
 
Old 01-09-2023, 10:01 AM   #5
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 195

Original Poster
Rep: Reputation: Disabled
I'll have to look at that. Never anything wrong with having more info.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Converting pem to encrypted pfx Mark_667 Linux - Security 2 05-21-2020 06:00 AM
.pem file format to .key format raj47 Linux - Newbie 1 04-14-2012 03:04 AM
converting pkcs12 to pem certificate tahiri.ahmed Linux - Security 3 08-15-2011 05:06 AM
Problem reading PEM private key in Qt 4.4 sydney-troz Programming 0 05-17-2008 09:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration