chaining ssh sessions to run a remote command


    Goal:  run a command on remote server target.localdomain, where
           target.localdomain is not internet-addressable, but can be
           reached from gateway.example.com.

    $ ssh -t gateway.example.com "ssh target.localdomain \" commandline \""

    or more generically:

    #!/bin/bash
    ssh -t gateway.example.com "ssh target.localdomain \" $* \""


date: 01/18/2010