Is sharing the RSA public key secure? I am trying to understand how RSA public key cryptography works. I have the following questions:


Are any attacks / compromises possible if a server sends its public key $(n,e)$ in the clear to a client?
Suppose a server is using the same public key $(n,e)$ for all the clients in a LAN. Does this pose a threat?
Are any attacks / compromises possible if a server sends its public key $(n,e)$ in the clear to a client?
  


Nope, it's a public key; it's designed to be public. Shout it out loud, tell the world, there's no risk.

That said, you want to be sure that a Man In The Middle attacker can't intercept the message and replace your public key with their own and then pretend to be you. The only real way to prevent this in to get your public key embedded into a Public Key Certificate tying that public key to your server in some unique way (IP, or domain name, or email address, etc) by a Certificate Authority that both you and the other person have in their trust store. (I'll leave out further details from this post.)


  
  Suppose a server is using the same public key $(n,e)$ for all the clients in a LAN. Does this pose a threat?
  


Yup, that's fine.