Hot answers tagged ssh-tunneling
netstat and lsof or fuser are typical programs to view what ports are opened by what (though may require root or such access, depending, and vary by flavour of unix). A shared destination port is fine. It may help to work through e.g. Beej's guide to networking to understand the system calls involved. If the client has not connected, then any ports it ...
On a Linux client, you may view listening ports with netstat -lnp |less. Within an ssh session, you can press enter twice, then type ~#. That will list the currently forwarded ports for that session.
Only top voted, non community-wiki answers of a minimum length are eligible