Tag Archives: SSH

Tips: Managing Many Servers via SSH

I manage many servers in my line of work and have found a few things to make life a little easier when it comes to SSH’ing into them when I start my laptop up.The first of these is maintaining an up to date ssh config file which is kept in ~/.ssh that allows me to alias the server address and key. A basic entry in the config file would be for an Amazon Web Services EC2 instance:

Host prod-servername01
HostName ec2-184-88-888-88.compute-1.amazonaws.com
User someuser
IdentityFile /.ssh_keys/servergroup.pem

Once you have all your servers in the config file I create a very simple script to start gnome-terminal with each group of servers:

gnome-terminal --tab --title=prod-servername01 -e 'ssh prdo-servername01' --tab --title=prod-servername02 -e 'ssh prod-servername02'

From the above example you can get the idea of adding more tabs for each additional server. I then create desktop or menu shortcuts for each grouping of server to launch a terminal and ssh into all in the group.

Safe and Secure Browsing Through Home Computer

I have found a little OpenSSH switch to be one of my best friends. If I am at a strange client network, cafe, or conference I use “-D” to make me feel warm and fuzzy all over. In OpenSSH if you use this switch you create an SSH SOCKS proxy on the port you specify. Thus encrypting your traffic to the SSH server you specify. In my case I connect to my home computer using a free DYNDNS (http://www.dyndns.com/) dynamic DNS name mapped to my home computer that stays on.


$ssh -D 6666 username@ip-address-of–your-ssh-server

Then you simply point your browser or other programs like IM to that port (in example 6666) on localhost and you can browse from your home computer free of snooping or any potential malicious users.

Another handy tool is ProxyChains (http://proxychains.sourceforge.net/) which I know works on Linux and might compile for you Mac people too.