----
For a long time I used "Gnome Connection Manager" to manage remote servers, however I moved to "Terminator". I really love Terminator, but If I'm missing something, it will be the sidebar in GCM :D
Anyway, I'm currently using "~/.ssh/config" file to manage remote servers (which contains: servers name, hostname, ssh port, username), till I started using best configuration management tool ever ... Ansible :D
So, I was needed to make a Ansible inventory file from the servers I manage, and as usual AWK is the best for this purpose ... quick and simple :D
I wrote small snippet to generate Ansible inventory from SSH config file, it's really simple script and assume you have "Host", "Hostname", "Port", "User" in separated lines, and valid SSH config file (there are no checks or tests done at all).
#! /bin/bash #This snippet assume each "Host", "Hostname", "Port", "User" in separated line, and valid ssh config file. ssh_conf_to_ansible () { awk 'BEGIN{IGNORECASE=1} {gsub(/\s+/," "); gsub("Host ",""); gsub("Hostname ","ansible_ssh_host="); gsub("Port ","ansible_ssh_port="); gsub("User ","ansible_ssh_user=")}; NR%4{printf $0" "; next; }1' } egrep -i "^(Host|Hostname|Port|User)" ~/.ssh/config | ssh_conf_to_ansible