I am trying to google a method to achieve this but unable to find one.
Basically, I have created an SSH tunnel to several remote hosts through a bastion host using a command like this.
ssh -L 9000:ourprodserver.domain.com:1521 \
-L 9001:otherprodserver.domain.com:1521 \
-A -l [email protected] somebastionhost.domain.net
Now, how do I know the connection details mapping to the local port whenever the tunnel is active.
i.e I want to be able to create a list of this form.
L_port Remote_host R_port
9000 ourprodserver.domain.com 1521
9001 otherprodserver.domain.com 1521
Is it possible?