Virtual SSH-Hosts
The entry of Host-stanzas in the ssh_config or ~/.ssh/config allows one to specify custom settings for specific hosts or groups of hosts. One thing that is remarkable however, is that it allows one to create virtual SSH-Hosts just by creating a custom Host entry with a name of ones chosing:
Host home
HostName home-router.ath.cx
Port 12345
LocalForward xyz
But may also involve nifty ProxyCommand things, e.g. through tor or some other already set-up tunnel:
Host tunnelled-home
ProxyCommand nc localhost 12345 # or socat, or torproxy or ...
RemoteForward ...
The specifics are documented at in ssh_config(5).
Of course this is also very useful with all things that use ssh as a transport, such as rsync or git.
Written by Marcus Fritzsch
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#