I need to send my SSH Public Key to one of my customers, but I am not quite sure how to do this. I have already created a SSH key pair on my computer, but now I am stuck.
For users who wish to communicate sensitive information via email, public key cryptography can be used to send and receive email messages securely. In public key cryptography, a pair of cryptographic keys, one public and one private, are generated for each user.
On the local host, use ssh-keygen -e to export the public key into a UNIX file. Use FTP to distribute the uniq-ssh. type file to the remote host. You have now completed distribution of the public keys to remote hosts that store user keys in a UNIX files .
Conceivably, you can share the public key with anyone without compromising the private key; you store it on the remote system in a . ssh/authorized_keys directory. To use SSH public key authentication: The remote system must have a version of SSH installed.
If you generated a key pair you should have two files id_rsa
and id_rsa.pub
(note that id_rsa
may be replaced by an other name if you specified it).
The public key (so the *.pub
file) is the one which is meant to be shared so this is the one you should send to your customer.
However note that even though this file is public it is important that your customer receives the one you generated. If someone were to temper the file they could impersonate your server with the security issues this implies. So it is up to you to decide of a safe medium to share this file: This could be a physical USB key given from hand to hand, a secured messaging service or any other secured communication channel you have with your customer.
This is way late but could be easier then just sending hidden files if you are on a unix based system.
Just do:
pbcopy < ~/.ssh/id_rsa.pub
This will copy your public key to your clipboard. So basically just do a paste anywhere you want to paste your key for sending it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With