The Hacker's Utility Belt: SSH
sigusr2.net
sigusr2.net
~/.ssh/config:
# This is maybe useful if you get dropped all the time
# due to stricter SSHd rules.
ServerAliveInterval 60
# Instead of tunneling always with the CLI directly why not
# make a entry in your ssh config to make it easy, e.g.
HostName your.companies.host
User username
LocalForward 9999 clients.oracle.server.name:1521
# You can also use "Port" if the SSHd is on a non 22 port
On the CLI:
# Does all the tunneling automatically
ssh your.companies.host
(The following is an excerpt from the manpage for ssh(1) with the same title)
~. Disconnect. ~? Display a list of escape characters.
The ~. escape character is useful for getting back to your prompt when your SSH session has hung or died.
For example, I use agent-forwarding all the time at $EMPLOYER, because the same sysad is responsible for my workstation and the production systems, so every host is equally trustworthy. I might use agent-forwarding when connecting to a shell-server run by a friend, I wouldn't use it while connecting to an anonymous service like github or gitorious.