ssh_tunnel - acis-acheron/acheron GitHub Wiki

Setting up an SSH tunnel (through storm.cise.ufl.edu)

This documentation will assume you have a user set up on your indended server named homesweethome, and a user set up on storm named iheartcise. The tunnel port (should be something obscure that hopefully nobody will ever conceivably take) will be 31337 (for lack of something more clever).

On Storm (in ~/.ssh/config:

Host  storm storm.cise.ufl.edu
    User      iheartcise
    HostName  storm.cise.ufl.edu

Host  storm_home storm-home
    User          homesweethome
    ProxyCommand  ssh storm nc %h %p
    HostName      localhost
    Port          31337

On your "server":

Host  storm storm.cise.ufl.edu
    ServerAliveInterval 60
    User                iheartcise
    HostName            storm.cise.ufl.edu

Host  storm_gateway storm-gateway
    User           iheartcise
    RemoteForward  31337 localhost:22
    HostName       storm.cise.ufl.edu

On your client:

Host  storm_home
    User          homesweethome
    ProxyCommand  ssh storm nc %h %p
    HostName      localhost
    Port          31337

Now from the server, you should run ssh storm-gateway, and from the client you should run ssh storm-home. Public/Private key authentication is recommended, but not required (although entering two passwords all the time sucks).