Networking – What is an Ephemeral Port and Its Function

networkingtcp

I suddenly came across the term "ephemeral port" in a Linux article that I was reading, but the author did not mention what it is.

What is an ephemeral port in UNIX?

Best Answer

In essence an ephemeral port is a random high port used to communicate with a known server port. For example, if I ssh from my machine to a server the connection would look like:

192.168.1.102:37852 ---> 192.168.1.105:22

22 is the standard SSH port I'm connecting to on the remote machine; 37852 is the ephemeral port used on my local machine