Tuesday, October 9, 2012

Create aliases for hosts to quickly SSH in

The folks at  howtogeek.com have a handy little tip on How to create aliases for your hosts to enable you to quickly ssh into them!

The gist is to turn
$ ssh -i yourkey.pem username@123.456.789.012
$ ssh dev-server

To do so, edit ~/.ssh/config to look like..

Host dev-server
        User username
        HostName 123.456.789.012
        IdentityFile /path/to/yourkey.pem
        ServerAliveInterval 120
        ServerAliveCountMax 30

You can save multiple hosts like this.

No comments:

Post a Comment

Popular Posts