ssh config

I’m in and out of servers all day. One thing I’ve found helpful is a ssh config file. Create a file and place it ~/.ssh/config. You can add as many entries as you like.

Host s3-rsync
  User ec2-user
  IdentityFile "~/.ssh/private-key-location"

Host: A friendly name/handle which you’ll use.

HostName: The remote server address you’ll be connecting to.

User: The user you want to connect as.

IdentityFile: The private key to authenticate with.

Once its all setup you can connect by typing: ssh s3-rsync

This is the same as: ssh -i ~/.ssh/bs2-deploy