title: What does it mean to connect to a certain port?
body: <p>For example, when you make an ssh connection, you are connected to port 22. What happens then? On a very high level brief overview, I know that if port 22 is open on the other end and if you can authenticate to it as a certain user, then you get a shell on that machine.</p>
  
  <p>But I don't understand how ports tie into this model of services and connections to different services from remote machines? Why is there a need for so many specific ports running specific services? And what exactly happens when you try to connect to a port? </p>
  
  <p>I hope this question isn't too confusing due to my naive understanding. Thanks.</p>