Local port forwarding through a bastion machine:
One line version:
ssh -i ~/.ssh/bastion-key.pem -N -L 9000:db.mycompany.com:1521 myuser@bastion.mycompany.com
Or run with -v
to debug:
ssh -v -i ~/.ssh/bastion-key.pem -N -L 9000:db.mycompany.com:1521 myuser@bastion.mycompany.com