User Crover has given a very great explanation for this question: RSA or ECDHE for x.509 certificates-what does each do? I have one question to Crover and/or any other member.
What I understand from the Crover's answer, if client (a Web Browser for example) and the Web server agree on ECDHE_RSA, they will come up with the the ephemeral session keys for each side of the channel without sharing the session key with each other, then what the server's public key in the certificate is used for?
Probably just to validate that the cert belongs to who that claim it to be. For that, the client/browser has to send some data encrypted with the server's public key and client has to receive a valid answer. Server would not send the answer encrypted with the long term private key as MITM can hack that key for replay attack.
Much appreciated, and Thanks.