2024-02-01.20-29-57.mp4
- 📖 About the Project
- 💻 Getting Started
- 👥 Authors
- 🔭 Future Features
- 🤝 Contributing
- ⭐️ Show your support
- 📝 License
EC2 Auto Logger is a script that improves my productiviy i.e. it automates my daily workflow of logging in to my AWS EC2 instance remotely with a .pem file maintaining a clean and organized file/folder structure rather than a clutter of .pem files in my DOwnloads folder that I struggle to look through to figure out which was most recently downloaded.
Bash
- Locate .pem file
- Initiate login to instance
Live demo for functioning script.
To get a local copy up and running, follow these steps.
-
create a ~/AWS_SSL folder to manage all your ssh keys for logins to your instances
-
Create a filename.sh file and copy the contents of move_and_ssh.sh into it on your preferred location
-
Give the .sh file execute permissions with:
chmod +x filename.sh
- Create an alias in your /.bashrc file to use when running the script in this case loginaws
alias loginaws='move_and_ssh.sh'
- Close file and reload shell configuration with
source ~/.bashrc
-
Download your allocated .pem file from labs.
-
Run the command loginaws from terminal
-
Enter IPV4 Address of your remote EC2 instance.
-
Congratulations !!! Logged in successfully with a few clicks
-
The script checks for downloads of labsuser.pem file, If you have a .pem file with different naming, adjust the variable in the script.
-
The location of the .pem file keys downloaded are presumed to be in the downloads folder.
👤 Abel Morara
- GitHub: @githubhandle
- Twitter: @twitterhandle
- LinkedIn: LinkedIn
- [Handle remote Login to multiple instances]
Contributions, issues, as well as feature requests are welcome! Fork the Repo and make some magic.
Feel free to check the issues page.
If you like this script, kindly leave a comment below and share it with someone who enjoys coding! or still, give it a ⭐️!
This project is MIT licensed.