Do I need to keep the comment at the end when I copy SSH public keys to another machine?

4

Say I have a public RSA SSH key that looks like:

ssh-rsa ijvoienvejfvmiejnci3onrvejviewlonvcljnrijcnreionv me@machine

If I’m copying this key to share with another machine, do I include the comment at the end (me@machine)? Do I include the header (ssh-rsa)?

Anonymous

Posted 2016-12-21T16:24:44.250

Reputation: 273

Answers

5

Header yes, comment - up to you;

The header tells of the encryption used, and while it maybe possible to figure it out, it's easier this way ;)

As for the comment at the end, you can keep it, get rid of it or change it as you want.

djsmiley2k TMW

Posted 2016-12-21T16:24:44.250

Reputation: 5 937

1The comment is handy when looking at an authorized_keys file to pick up at a glance which keys are authorized. – Alessandro Dotti Contra – 2016-12-21T20:35:57.503

It is not encryption. It is "just" the key type, but it does not mean it is less important. – Jakuje – 2016-12-21T21:32:05.640