Let’s know how to SSL works. SSL(Secure Sockets Layer) is a protocol used to establish a secure & encrypted connection between a client & a server:
Here’s a high-level overview of how SSL works:
- Handshake Initiation:
- When a client connects to a server, it requests a secure connection by sending a “ClientHello” message. This message includes the client’s supported SSL/TLS versions and cryptographic algorithms.
- Server Response:
- The server responds with a “ServerHello” message. This message includes the SSL/TLS version and cryptographic algorithm selected by the server from the list provided by the client.
- Server Certificate:
- The client receives the server’s digital certificate. This certificate, which was issued by a reputable Certificate Authority (CA), includes the public key of the server. The client uses this certificate to authenticate the server’s identity.

4. Key Exchange:
- The client and server exchange keys to establish a shared secret. This is usually done using an asymmetric encryption algorithm like RSA or a key exchange algorithm like Diffie-Hellman. The client generates a random pre-master secret, encrypts it with the server’s public key, and sends it to the server. Only the server, with its private key, can decrypt this message.
5. Session Keys Creation:
- Both the client and server use the pre-master secret and some additional data exchanged during the handshake to generate session keys. These session keys are symmetric keys used for encrypting and decrypting data during the session.
6. Client Finished:
- The client sends a “Finished” message, encrypted with the session key, indicating that the client part of the handshake is complete.
7. Server Finished:
- The server sends a “Finished” message, encrypted with the session key, indicating that the server part of the handshake is complete.
8. Secure Communication:
- Once the handshake is complete, both the client and server use the session keys to encrypt and decrypt the data they send to each other, ensuring that the communication remains private and secure.

READ MORE
https://blog.vcclhosting.com/how-to-change-the-rdp-port-of-a-windows-server/: Mastering SSL Works: A Detailed User’s Guide