Sunday, February 10, 2013

my ssh fast path

This is a collection of past week digging and mocking SSH things. Here's what I have:

1. a neat Gnome Terminal alternative is quake-[ohhhh that Quake !]-like terminal http://guake.org/

have handy the terminal sliding down from the screen, clearing my panel to sometimes 5 to 10 terminals [sorry, didn't get to switch tabs in Gnome Terminal]

2. very useful article about tweaking local ~/.ssh/config, several things I applied from it:
http://blogs.perl.org/users/smylers/2011/08/ssh-productivity-tips.html

3. another very useful script which you can use to perform auto-complete to hosts you regularly use.
http://surniaulula.com/2012/09/20/autocomplete-ssh-hostnames/

Managing SSH connections: this is a topic I've been attempted to get my life easier from some time ago.
First I got on different SSH managers. That sucks, I'm already on linux, c'mon !

Second I got to manage ssh connections in simple .sh scripts. With my limited scripting shell abilities, I soon got bored :) Then I had to have different users/hosts combination, I'd needed to duplicate them, eventually.

Enter hosts autocomplete: you define your own hosts on ~/.ssh/config, then enter ssh followed by usual bash Alt key, all hosts found will get displayed.

At the end, here's my current  ~/.ssh/config

tada@tada:~/.ssh$ cat config
ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r
ControlPersist 2h
TCPKeepAlive no
ServerAliveInterval 60
ServerAliveCountMax 10

Host xxx.yyy.com
Host xxx.yyy.com
#add hosts here, not /etc/hosts :) nice difference to NOT mix them

No comments: