I learned a neat trick lately that has to do with SSH. If you are like me and use secure shell to connect to a remote box or for git push/pulls then you most likely be interested in this next little configuration file.
As you probably know, all your ssh configurations and keys probably reside in the .ssh folder of your home directory.
Go to this directory and use vim to create a file named config.
Lets add a host definition.
(I do recommend a non privileged user for ssh’ing, you can always su or sudo later)
Host mybox Hostname 192.168.2.100 Port 22 User root
Now if you do.
SSH will look for “mybox” in the config file and execute the following equivalent.
Cool no? Now you might ask why all this for just a little bit of less typing, well it gets pretty neat if you work with public/private keys.
Create a file with your github private key and name it github.key, save it into your ~/.ssh/ folder.
Host github.com IdentityFile ~/.ssh/github.key.
This will make git (over ssh) actions for the github.com domain use this specific key.