SSH config Shortcuts
Ssh'ing into servers alot ?
Tired of typing "ssh user@typeditsomanytimesitscrazy.com".
There is a simple trick you can use to save you some time, when you do it as often as i do.
Basically, you can create Hostname shortcuts in your ~/.ssh/config file.For example if your ~/.ssh/config file looks like the one below
Host production Hostname production.example.com User ubuntu IdentityFile ~/secretlocation/example.pem Host staging Hostname staging.example.com User deploy ForwardAgent Yes </code> </pre> You can just $ ssh production </code></pre> or $ ssh staging </code></pre> The line below takes care of SSH forwarding ForwardAgent Yes </code></pre>
Written by Rishav Rastogi
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ssh
Authors
Related Tags
#ssh
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#