Created
July 6, 2020 12:31
-
-
Save chinmay-sh/6f00b5686c037ea24ebe4068ed727857 to your computer and use it in GitHub Desktop.
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
echo ++++++=====+++++=====+++++=====+++++=====++++++ | |
echo ----------- Welcome to SSH Script ------------- | |
echo ++++++=====+++++=====+++++=====+++++=====++++++ | |
echo | |
echo Select your choice: | |
echo | |
echo 1. AWS | |
echo 2. AZURE | |
echo 3. GCP | |
echo 0. Exit | |
echo | |
echo -n Enter your choice: | |
read CHOICE | |
echo You selected: $CHOICE | |
if [ "$CHOICE" = "1" ]; | |
then | |
echo Connecting to AWS! | |
ssh -i /path/my-key-pair.pem my-instance-user-name@my-instance-public-dns-name | |
echo DONE! | |
fi | |
if [ "$CHOICE" = "2" ]; | |
then | |
echo Connecting to AZURE! | |
ssh -i /path/my-key-pair.pem my-instance-user-name@my-instance-public-dns-name | |
echo DONE! | |
fi | |
if [ "$CHOICE" = "3" ]; | |
then | |
echo Connecting to GCP! | |
ssh -i /path/my-key-pair.pem my-instance-user-name@my-instance-public-dns-name | |
echo DONE! | |
fi | |
if [ "$CHOICE" = "0" ]; | |
then | |
echo Connecting to AZURE! | |
exit 0 | |
echo DONE! | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment