Using multiple ssh keys on Mas OS X Mountain Lion

Many times we need to use different keys to connect to different hosts. This can be very easily done in Mac OS X or Linux. For instance if we have two private keys generated: id_rsa, id_rsa2. We just need to edit the file “~/.ssh/config” or create it if it doesn’t exist. Then add the hosts and authentication method: