Skip to content

Instantly share code, notes, and snippets.

@chinmay-sh
Created July 6, 2020 12:31
Show Gist options
  • Save chinmay-sh/6f00b5686c037ea24ebe4068ed727857 to your computer and use it in GitHub Desktop.
Save chinmay-sh/6f00b5686c037ea24ebe4068ed727857 to your computer and use it in GitHub Desktop.
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