I find it easier to put all this in ~/.ssh/config as described here: Jump Hosts -- Passing Through a Gateway or Two