I\'m rewriting a Bash script I wrote into Python. The crux of that script was
ssh -t first.com \"ssh second.com very_remote_command\"
I\'m
For a ready made solution check out pxssh from the pxpect project. Look at the sshls.py and ssh_tunnel.py examples.
http://www.noah.org/wiki/Pexpect