1

Usually, at the end of an RSA public key, you find something like 'username@hostname' by default or something else otherwise you specified. It is said that it is just a comment and doesn't matter at all.

My question is the following. When I copy and add my public key to a server's authorized_keys file, is it necessary to include this part together with the long key string? Or should this part match at all between the server and my local machine?

xiaohuamao
  • 109
  • 7

1 Answers1

0

I assume that by "send" you mean adding your public key to your account's authorized_keys file.

When adding the key there, it usually makes little sense to use username@hostname, as it's clear for what username and host the key is being used.

You better use a more meaningful comment, explaining uses of the key (if you use more keys). If you have just one key, no comment is needed.