Maybe stupid question, but I can not find any good enough question. Currently I am defining some server configuration thru cloud-config
as part of IaC idea. One part of configuration are also SSH public keys of server adminsitrators. My reason says this is public info and I should not worry too much to protect it, but I still want some extra confirmation.
So it is OK, security wise, to store (commit,push) public SSH keys in GIT repo?
There's no theoretical security problems to storing public keys in a repository. The conceptual idea of a public key is that it is known to everyone: the whole world knows it.
Now, as a practical matter, because a public key usually uniquely identifies a user, if someone gets ahold of that key, they may be able to correlate it with other locations where that user uses that key (e.g., GitHub, where all SSH keys are public) and decide that the user in question is an interesting target for phishing or other types of compromise based on correlating that user's usage.
This is one of those cases where the theoretical and practical security differs. Having said that, most people don't consider exposure of public keys a threat they have to deal with, and so checking them into a repository should be fine.