If you often connect to a machine through a gate, you will find this simple command useful. The idea is to open a pseudo-tty and to execute another instance of ssh. Supposing you want to log in the machine hirogen through ssh.epita.fr.
ssh -t [login@]ssh.epita.fr ssh [login@]hirogen
The -t option tells the gate to allocate a pty so that the program you want to execute (everything after the host) can actually be tunneled (sort of). Using a public key, you can access your hidden host without entering your password. And when you exit the remote machine, you will automatically leave the gate too.
The Arcade Fire – Neighborhood #1 (Tunnels) (2003):
Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.