Created
September 12, 2018 13:00
-
-
Save BitBy73Bit/c30c7a420b0ac510136e7272b00b8cf7 to your computer and use it in GitHub Desktop.
AWS SSH Bash Helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| USERNAME="ec2-user" | |
| PEMPATH="~/.ssh/ck-production-ec2.pem" | |
| printf "\n*** AWS EC2 SSH ***\n" | |
| if [ "$1" != "" ]; then | |
| printf "Connecting to AWS EC2 Instance with IP: $1\n" | |
| else | |
| printf "Error: Please specifiy an EC2 Instance IP Address\n\n" | |
| exit; | |
| fi | |
| ssh -o StrictHostKeyChecking=no $USERNAME@$1 -i $PEMPATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment