0

What is the difference between SSH public/private key created by root and the ones created with a normal user.

is there a security problem if we send an SSH public key of a client to the SSH server so we can use it ?

1
  • Please ask one question at a time.
    – user68186
    Feb 28, 2019 at 16:53

1 Answer 1

0

There is no difference at all, as the key does not save info about the username. You can create a key on username joe on host A and publish the correspondent pubkey as user bob on host B.

5
  • My Manager find out that I sent to him my public key made by root account. Asked me why I used root account but I didn't know what to say because I thought there is no differences between them. I don't know how he find out so I suppose there is differences between them.
    – yaya
    Mar 6, 2019 at 16:52
  • The key has support for a comment. Sometimes the comment "field" is filled with the username and hostname [email protected]) where the key was created. So yes, if this info is present, one can identify the host and user that created the key, but the key isn't limmited to use only by this user. Take a look at this link: en.wikibooks.org/wiki/OpenSSH/Client_Configuration_Files#~/.ssh/…
    – JucaPirama
    Mar 6, 2019 at 18:09
  • You're right. cat id_rsa.pub and find out that there is root@hostname at th end. Thank you. I didn't notice that before. is there a way to force not adding that comment when creating the ssh keys ??
    – yaya
    Mar 7, 2019 at 9:15
  • Never really tried, bu you could try something like # ssh-keygen -C MyKey or # ssh-keygen -C " "
    – JucaPirama
    Mar 7, 2019 at 11:21
  • And please, mark the question as asked.
    – JucaPirama
    Mar 8, 2019 at 1:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .