Reading Github's Generating SSH keys tutorial, I saw this on the Step 2: Generate a new SSH key:
ssh-keygen -t rsa -b 4096 -C "[email protected]"
What bothers me is the "[email protected]"
. I know that is just a comment and it is even optional. But I was wondering, is it safe to put your email address there? Because I think it is recommended to put your machine, not your email, something like "my-machine@home"
.
I already used public keys following that tutorial, so my email address is in some of my public keys. Should I fix it? Or it is not a problem?
It's only a comment and for quick identification, really. (But one should really use fingerprints, see https://stackoverflow.com/a/32130465/800526)
If you would like to keep your email private, you can simply change that in your public key to something else, before copying and pasting your public key.
The email is only optional field to identify the key.
When you create the ssh you type (for example):
ssh-keygen -t rsa -C "any comment can be here"
-t = The type of the key to generate
-C = comment to identify the key
So the Comment is for you only and you can put anything inside.
Many sites and software are using this comment as the key name.
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