If you use ssh a lot, you may sometimes feel tired giving same options all the time for the same server.
For example if you have an account ‘alpha’ on a server called ‘tarentula’ you may use the following command:
ssh alpha@tarentula
You may simplify your life: insert the following lines into your .ssh/config:
Host tarentula
User alpha
Then, you can just type:
ssh tarentula
and you will get logged in ‘tarentula’ with the ‘alpha’ account.
I admit, this is not very impressive. But consider the following lines into your ~/.ssh/config:
Host tarentula
User alpha
ForwardX11 yes
ForwardX11Trusted yes
Host *
Compression yes
This basically means: for the ‘tarentula’ host given on the command line (this is different than the real host, see below): forward my X display (like if you did a ssh -X tarentula); and for all hosts (including tarentula), enable compression.
Better, if, for some reasons, you are behind a firewall, you can still access to an external server using the following:
Host tarentula
ProxyCommand corkscrew proxy.company.com 8080 %h %p
Of course, corkscrew should be installed on your machine.
Finally, if you use virtualisation, you may have setup some ssh tunnels in order to access your various virtual machines. But you end up having to type ssh commands such as this one:
ssh -p 22024 beta@10.0.0.10
to enter as ‘beta’ in the 24th virtual machine that 10.0.0.10 is currently running. A config file such as this one:
Host vm24
HostName 10.0.0.10
Port 22024
User beta
will make your life much simpler:
ssh vm24