Taking advantage of SSH Config
I've to ssh into EC2 instances frequently, initially i was doing with following command
me@group ~ $ ssh me@amazon-ec2-instance-public-ip -i ~/.ssh/my-public-key
and typing this all the time doesn't make any sense, so i look forward to automate this and found ssh config options. That said I have to update ~/.ssh/config
with following
Host dev
HostName public-ip-goes-here
User me
IdentityFile ~/.ssh/my-public-key
thats it, every time i need to ssh to that machine, i just type following in the command prompt
me@group ~ $ ssh dev
More options can be found at http://linux.die.net/man/5/ssh_config
Written by Shaikhul Islam
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ssh
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#