Re:Terminology – a new terminal emulator
by bashinator on Tuesday March 26, 2013 @12:55AM
(#5441474)
You should know that the bash-completion package in Debian and kin does tab-expansion of ssh hosts in known_hosts and config. Also handles the --argument switches for just about all common utilities.
I have a shell function called 'go' that creates a new screen and labels it, connects to the remote host via SSH, and then recreates or re-attaches to the remote scren as appropriate. My top level screen session currently has 8 remote hosts I'm logged into, each running their own nested screen sessions.
My go() function also reads my ~/.ssh/config file to grab all my host aliases so I can tab complete to them. Note, I'm a Perl programmer, and rarely write shell scripts, so this function may be kinda ugly.