What shall I use as a comment while creating the SSH key and how this comment will be used?

I’m trying creating SSH key for gitlab repo following official doc.

Run ssh-keygen -t followed by the key type and an optional comment. This comment is included in the .pub file that’s created. You may want to use an email address for the comment.

It’s unclear for me what shall I use as an optional comment?

So there is a suggestion to use an email as the comment. Where and how this comment will be used? What if I just skip comment since it’s optional anyway?

>Solution :

If you have several ssh keys (for instance one for your laptop, one for your iPad, or one for different users) the comment allows you to distinguish between them. It doesn’t need to be your email address, but that works well if it’s a "distinguish between multiple users" problem. You can also just edit the comment – it isn’t used programmatically.

Leave a Reply