This file contains 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
<< //// | |
This function will ssh into a EC2 based on Name tags. You can ssh in via public or private IP This function requires awscli to work | |
There are several optional environment variables: | |
AWS_PROFILE = Control which profile is active with this variable, if this is unset the function will use AWS_DEFAULT_PROFILE instead | |
SSH_EC2_KEY_FILE = path to the key file for the user | |
SSH_EC2_USER = name of the user that logs in, if this variable is unset the value is ec2-user | |
To use this function do the following commands | |
(from command line) |