Use netstat with the -anpe option. The e option shows the inodes and I do not know if it will always work or if it was by fluke but I was dealing with dozens of SSH sessions and needed to know which session was related to which forward (the PIDs of the SSH and SSHD did not match etc...)
Notice the "59560675" and "59560762" those are almost identical, if you find two sets that are nearly identical except for the last 3 digits they may match (in my case they need and all the other sessions seemed to be like this too, close by inode number)
tcp 0 0 ::ffff:126.96.36.199:443 ::ffff:188.8.131.52:33356 ESTABLISHED 0 59560675 10198/sshd: audi
tcp 0 0 127.0.0.1:50003 0.0.0.0:* LISTEN 500 59560762 11767/sshd: audi
Obvously the above way is cumbersome and maybe was a fluke or won't work but it worked in my case. I would still like to know if there is a better or proper way of tracking/mapping SSH sessions to port forwards.
ssh, matching, assocation, howtouse, netstat, anpe, inodes, fluke, dozens, sessions, pids, sshd, etc, quot, identical, digits, inode, tcp, ffff, established, audi, obvously, cumbersome, mapping, forwards,