Sponsored Content
Top Forums UNIX for Dummies Questions & Answers SSL Public key/Private question Post 302322484 by robsonde on Thursday 4th of June 2009 12:52:37 AM
Old 06-04-2009
start by generating a private key
Code:
openssl genrsa -out x.key 1024

Then use that private key to generate your request to the CA.
Code:
openssl req -new -key x.key -out request.pem

then you send the request.pem to the CA.
they will return a signed certificate.

the x.key file is both the Public key and the Private key.
the signed cert is just the public key with a signed blob of crypto stuff.

Last edited by robsonde; 06-04-2009 at 02:01 AM..
 

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Public/Private Key SSH from UNIX to Windows (Cygwin)

Hello all, I have a bit of trouble working a passwordless SSH from UNIX to Cygwin running windows 2k3. Here are some details. I AM able to SSH from the Windows box to the UNIX box using the keys. Also, I'm able to SSH from UNIX to Windows w/o the keys. However, when I try to do it with the keys... (9 Replies)
Discussion started by: kclerks11
9 Replies

2. Shell Programming and Scripting

SFTP in a shell script without public/private key

Hi everybody, I need some help on writing a script that is able to remote copy file to one server. I already created this types of scripts, and works ok as long as this server I want to copy from is access through telnet. Here is how I do it: ftp -n xxx.xxx.xxx.xxx << _EOF_ user user_name... (6 Replies)
Discussion started by: Alexis Duarte
6 Replies

3. Shell Programming and Scripting

how to ssh to remote unix machines using private/public key

hello, iam able to ssh to a linux server from a linux server called "machine1" using the private/public key method, so I dont need to enter any password when I run my script but iam not able to ssh from machine1 to a UNIX server, access is denied. note that I am using an application id which is... (6 Replies)
Discussion started by: wydadi
6 Replies

4. Linux

SSL/TLS uses the public key to encrypt data ?

Hi, I have a doubt..whether the SSL/TLS protocol uses the public key of the web server to encrypt data before sending it. I knew the browser verifies the public key of the web server using the digital certificate (by verifying the signature of the certificate using trusted authority). whether... (2 Replies)
Discussion started by: chaitus.28
2 Replies

5. UNIX for Dummies Questions & Answers

how to create a public/private key using ssh-keygen

Hi, please guide me create a public/private key using ssh-keygen, lets say I have been access to server named pngpcdb1with a userid and password ...!!! and also please explain in detail the concept of these keys and ssh as I was planning to use them in ftp related scripts..! Thanks in... (1 Reply)
Discussion started by: rahul125
1 Replies

6. Solaris

Public private key setup issue in Solaris 10

Hi i am using solaris 10.I am trying to setup a public/private key but it is not working.Appreciate your repsonse on it There are two servers DB1 server and DB2 server. 1)I have generated public/private key using below step on both servers. ssh-keygen -t rsa 2)From DB1 server moved the... (6 Replies)
Discussion started by: muraliinfy04
6 Replies

7. UNIX for Dummies Questions & Answers

Public and Private Key generation for scp

Hi, What tool is used to generate public and private keys for SCP? Do you have an example script that generates these keys, puts them in files and then another example script that references them from SCP? Thanks, (9 Replies)
Discussion started by: Astrocloud
9 Replies

8. Shell Programming and Scripting

Rsa public private key matching

Hi All, I have a requirement where i need to check if an rsa public key corresponds to a private key and hence return success or failure. Currently i am using the command diff <( ssh-keygen -y -e -f "$PRIVKEY" ) <( ssh-keygen -y -e -f "$PUBLICKEY" ) and its solving my purpose. This is in... (1 Reply)
Discussion started by: mritusmoi
1 Replies

9. UNIX for Advanced & Expert Users

Private and public key encryption

Hi, we have private and public key, encrypt file using public and want to decrypt using private key. can you please advise below commands are correct or other remedy if unix have? encrypt -a arcfour -k publickey.asc -i TESTFILE.csv -o TESTFILE00.csv decrypt -a arcfour -k privatekey.asc... (2 Replies)
Discussion started by: rizwan.shaukat
2 Replies

10. UNIX for Advanced & Expert Users

Ssh public/private key user login problem

I have a user account configuration with ssh public/private key that works on multiple servers centos and rhel. One server (Server F) that is not working in centos 6.8. When i ssh into server f I get prompted for a password. I have verified the config and it all is good. I put sshd into debug... (8 Replies)
Discussion started by: bash_in_my_head
8 Replies
PKEY(1SSL)							      OpenSSL								PKEY(1SSL)

NAME
pkey - public or private key processing tool SYNOPSIS
openssl pkey [-inform PEM|DER] [-outform PEM|DER] [-in filename] [-passin arg] [-out filename] [-passout arg] [-cipher] [-text] [-text_pub] [-noout] [-pubin] [-pubout] [-engine id] DESCRIPTION
The pkey command processes public or private keys. They can be converted between various forms and their components printed out. COMMAND OPTIONS
-inform DER|PEM This specifies the input format DER or PEM. -outform DER|PEM This specifies the output format, the options have the same meaning as the -inform option. -in filename This specifies the input filename to read a key from or standard input if this option is not specified. If the key is encrypted a pass phrase will be prompted for. -passin arg the input file password source. For more information about the format of arg see the PASS PHRASE ARGUMENTS section in openssl(1). -out filename This specifies the output filename to write a key to or standard output if this option is not specified. If any encryption options are set then a pass phrase will be prompted for. The output filename should not be the same as the input filename. -passout password the output file password source. For more information about the format of arg see the PASS PHRASE ARGUMENTS section in openssl(1). -cipher These options encrypt the private key with the supplied cipher. Any algorithm name accepted by EVP_get_cipherbyname() is acceptable such as des3. -text prints out the various public or private key components in plain text in addition to the encoded version. -text_pub print out only public key components even if a private key is being processed. -noout do not output the encoded version of the key. -pubin by default a private key is read from the input file: with this option a public key is read instead. -pubout by default a private key is output: with this option a public key will be output instead. This option is automatically set if the input is a public key. -engine id specifying an engine (by its unique id string) will cause pkey to attempt to obtain a functional reference to the specified engine, thus initialising it if needed. The engine will then be set as the default for all available algorithms. EXAMPLES
To remove the pass phrase on an RSA private key: openssl pkey -in key.pem -out keyout.pem To encrypt a private key using triple DES: openssl pkey -in key.pem -des3 -out keyout.pem To convert a private key from PEM to DER format: openssl pkey -in key.pem -outform DER -out keyout.der To print out the components of a private key to standard output: openssl pkey -in key.pem -text -noout To print out the public components of a private key to standard output: openssl pkey -in key.pem -text_pub -noout To just output the public part of a private key: openssl pkey -in key.pem -pubout -out pubkey.pem SEE ALSO
genpkey(1), rsa(1), pkcs8(1), dsa(1), genrsa(1), gendsa(1) 1.0.1e 2013-02-11 PKEY(1SSL)
All times are GMT -4. The time now is 05:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy