I use OpenSSH daily. In fact the only app I probably use more is vim. However, until yesterday I was typing out the full username and hostname when using ssh:
ssh username@ridiculouslylong.domain.com
Ugh
Using the same username makes life a bit simpler:
ssh ridiculouslylong.domain.com
Meh, better, but I’m really lazy!
I’d heard about tab-completion for hostnames from various blogs, but never knew how to do it. I hopped into #debian and thirty seconds later someone had kindly told me about ~/.ssh/config
Not only is any host listed in your ~/.ssh/config auto-completed on the command line by hitting tab, but you can also specify what username to connect as! So my .ssh/config file looks something like:
Host host1.domain.com
User randomuser
Host www.somewhereelse.com
User someotheruser
Host mail.domain2.com
Host domain3.com
Now I can just type:
ssh h<TAB><ENTER>
to connect to host1.domain.com as randomuser.
Beautiful.
Check out man ssh_config for details and other options.
Also, if you’re not using ssh keys instead of passwords, you’re doing too much work. Seahorse makes SSH keys simple.