What we actually do here is... odd:
- We SSH to centos2, while saying that any connection attempts made to port 5353 on the remote machine (centos2) are to be passed back over the SSH session to our client (centos1).
- We then run SSH on our remote machine (centos2), specifying the localhost address and the port that we're passing back to centos1, 127.0.0.1:5353.
- The connection attempt is passed back over our established SSH session to centos1, where the SSH server accepts the connection request.
- As a result, we're locally SSH'ing to centos1 by specifying the local address and remote forwarded port on centos2.
Confused? I was the first time someone explained this to me.
To better understand this, we can use the w command. ...