Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-31-2014, 08:51 AM   #1
Registered: Jul 2009
Posts: 96

Rep: Reputation: 16
unknown option x509

I am trying to create a self-signed certificate on a Vagrant VM

Made a key using the command
[root]# openssl genrsa -des3 -out my-ca.key 2048

While trying to make the X.509 certificate with a 10-year lifetime using the command

[root]# openssl req -new -x509 -days 3650 -key my-ca.key -out my-ca.crt

I get the message
"unknown option x509" and the help menu for req options.

This had earlier worked on a different vagrant box, but is failing now.

One post from google search tells me to use
openssl req -new -x509 -keyout my-ca.crt -newkey rsa:2048

but I would like to have a separate key file and not just the certificate.

Any suggestions/ideas on what I may be missing?

Old 01-31-2014, 11:33 AM   #2
Registered: Jan 2014
Distribution: CentOS, Fedora, Ubuntu
Posts: 108

Rep: Reputation: 18
You have unknown option because of -x509 instead of just x509
In order to achieve private key and certificate separate

Private key
openssl genrsa -des3 -out server.key 2048
Generate CSR
openssl req -new -key server.key -out test.csr
Sign the certificate
openssl x509 -req -days 3650 -in test.csr -signkey server.key -out test.crt
1 members found this post helpful.
Old 02-01-2014, 07:57 PM   #3
Registered: Jul 2009
Posts: 96

Original Poster
Rep: Reputation: 16
Thanks myatthu.

That worked.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
rpm -bb unknown option nlardizabal Linux - Software 4 10-27-2005 11:44 AM
xvt: unknown option '-n' nfreeman Linux - Software 0 10-08-2005 11:31 AM
rpm --rebuild - unknown option? futz Linux - Newbie 8 08-03-2005 10:35 PM
rpm -ba => -b : unknown option nextone Linux From Scratch 3 12-22-2004 08:48 PM
rpm -bb : unknown option stevie_velvet Linux - Enterprise 4 09-08-2004 09:23 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:17 PM.

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