Okay this is how u do it, you can create a config file ~/.ssh/config
Localforward 2222 host_behind_firewall:22
Then ssh firewall, this will create a socket bound to localhost port 2222
ssh -P 2222 localhost
You will be sent to the machine behind the firewall then u can run the commands on it.
Or you can do it on the command line ssh firewall -L 2222 host_behind_firewall_ip:22