Name | ec2-simple-connect JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | A CLI tool to manage and connect to AWS EC2 instances |
upload_time | 2025-08-25 03:19:13 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | MIT License
Copyright (c) 2024 Your Name
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
aws
ec2
ssh
cli
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
```markdown
# EC2 Simple connect
[](https://opensource.org/licenses/MIT)
[](https://www.python.org/downloads/)
A powerful CLI tool for managing and connecting to AWS EC2 instances with automatic security group management and configuration handling.
## Features
- 🚀 Easy connection to EC2 instances
- 🔒 Automatic security group management
- ⚙️ Persistent configuration management
- 🌍 Region selection and management
- 💻 Instance state handling (start/stop)
- 🔑 SSH key management
- 🛡️ Secure credential handling
- 📝 Comprehensive logging
## Installation
```bash
pip install ec2-simple-connect
```
## Prerequisites
1. Python 3.7 or higher
2. AWS Account and credentials
3. SSH key pairs for your EC2 instances
## Quick Start
1. Configure your AWS credentials:
```bash
aws configure
```
2. Run EC2 Manager:
```bash
ec2-simple-connect
```
On first run, the tool will guide you through configuration setup.
## Configuration
The tool creates a configuration file at `~/.ec2manager/config.ini` with the following settings:
```ini
[DEFAULT]
ssh_key_path = ~/.ssh
default_region = us-east-1
default_username = ec2-user
security_group_protocol = tcp
security_group_port = 22
```
### Configuration Options
| Option | Description | Default |
|--------|-------------|---------|
| ssh_key_path | Path to SSH keys directory | ~/.ssh |
| default_region | Default AWS region | us-east-1 |
| default_username | Default SSH username | ec2-user |
| security_group_protocol | Security group protocol | tcp |
| security_group_port | Security group port | 22 |
## Usage
### Basic Usage
1. Start the tool:
```bash
ec2-manager
```
2. Select a region from the displayed list
3. Choose an instance to connect to
4. Enter username (or press Enter for default)
### Features in Detail
#### Region Selection
- Lists all available AWS regions
- Remembers last used region
- Easy switching between regions
#### Instance Management
- Lists all instances with details:
- Instance ID
- Name
- Status
- Public IP
- Supports starting stopped instances
- Handles instance state transitions
#### Security Group Management
- Automatically manages security group rules
- Adds rules for your current IP
- Removes rules when disconnecting
- Supports custom protocols and ports
#### SSH Connection
- Automatic SSH key selection
- Custom username support
- Handles different instance states
- Secure connection settings
## Security
- Configurations stored in protected directory (`~/.ec2manager`)
- Secure file permissions (600 for config files)
- Temporary security group rules
- No storage of sensitive credentials
## Development
### Setting Up Development Environment
1. Clone the repository:
```bash
git clone https://github.com/yourusername/ec2-manager.git
cd ec2-manager
```
2. Create a virtual environment:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. Install development dependencies:
```bash
pip install -e ".[dev]"
```
### Running Tests
```bash
pytest
```
### Code Formatting
```bash
# Format code
black src tests
# Sort imports
isort src tests
# Check style
flake8 src tests
```
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## Common Issues and Solutions
### Issue: "Unable to locate credentials"
- Ensure AWS credentials are configured: `aws configure`
- Check `~/.aws/credentials` exists and has valid credentials
### Issue: "Permission denied (publickey)"
- Verify SSH key exists in configured path
- Check key permissions (should be 600)
- Confirm correct username for instance
### Issue: "Connection timed out"
- Verify security group rules
- Check instance public IP is accessible
- Ensure instance is running
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Acknowledgments
- AWS SDK for Python (Boto3)
- The AWS CLI team for inspiration
- All contributors and users
## Support
If you encounter any issues or need support, please:
1. Check the [Common Issues](#common-issues-and-solutions) section
2. Search existing GitHub issues
3. Create a new issue if needed
## Project Status
Active development - Accepting contributions
## Author
Meraj (meru.meraj64@gmail.com)
---
Made with ❤️ by meraj64
Raw data
{
"_id": null,
"home_page": null,
"name": "ec2-simple-connect",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "aws, ec2, ssh, cli",
"author": null,
"author_email": "Meraj <meru.meraj64@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/e3/d4/58f44884447fa852a96ad3a05e7ee8b4ded5b661da654cd95a2241ac05fa/ec2_simple_connect-0.1.0.tar.gz",
"platform": null,
"description": "\n```markdown\n# EC2 Simple connect\n\n[](https://opensource.org/licenses/MIT)\n[](https://www.python.org/downloads/)\n\nA powerful CLI tool for managing and connecting to AWS EC2 instances with automatic security group management and configuration handling.\n\n## Features\n\n- \ud83d\ude80 Easy connection to EC2 instances\n- \ud83d\udd12 Automatic security group management\n- \u2699\ufe0f Persistent configuration management\n- \ud83c\udf0d Region selection and management\n- \ud83d\udcbb Instance state handling (start/stop)\n- \ud83d\udd11 SSH key management\n- \ud83d\udee1\ufe0f Secure credential handling\n- \ud83d\udcdd Comprehensive logging\n\n## Installation\n\n```bash\npip install ec2-simple-connect\n```\n\n## Prerequisites\n\n1. Python 3.7 or higher\n2. AWS Account and credentials\n3. SSH key pairs for your EC2 instances\n\n## Quick Start\n\n1. Configure your AWS credentials:\n```bash\naws configure\n```\n\n2. Run EC2 Manager:\n```bash\nec2-simple-connect\n```\n\nOn first run, the tool will guide you through configuration setup.\n\n## Configuration\n\nThe tool creates a configuration file at `~/.ec2manager/config.ini` with the following settings:\n\n```ini\n[DEFAULT]\nssh_key_path = ~/.ssh\ndefault_region = us-east-1\ndefault_username = ec2-user\nsecurity_group_protocol = tcp\nsecurity_group_port = 22\n```\n\n### Configuration Options\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| ssh_key_path | Path to SSH keys directory | ~/.ssh |\n| default_region | Default AWS region | us-east-1 |\n| default_username | Default SSH username | ec2-user |\n| security_group_protocol | Security group protocol | tcp |\n| security_group_port | Security group port | 22 |\n\n## Usage\n\n### Basic Usage\n\n1. Start the tool:\n```bash\nec2-manager\n```\n\n2. Select a region from the displayed list\n\n3. Choose an instance to connect to\n\n4. Enter username (or press Enter for default)\n\n### Features in Detail\n\n#### Region Selection\n- Lists all available AWS regions\n- Remembers last used region\n- Easy switching between regions\n\n#### Instance Management\n- Lists all instances with details:\n - Instance ID\n - Name\n - Status\n - Public IP\n- Supports starting stopped instances\n- Handles instance state transitions\n\n#### Security Group Management\n- Automatically manages security group rules\n- Adds rules for your current IP\n- Removes rules when disconnecting\n- Supports custom protocols and ports\n\n#### SSH Connection\n- Automatic SSH key selection\n- Custom username support\n- Handles different instance states\n- Secure connection settings\n\n## Security\n\n- Configurations stored in protected directory (`~/.ec2manager`)\n- Secure file permissions (600 for config files)\n- Temporary security group rules\n- No storage of sensitive credentials\n\n## Development\n\n### Setting Up Development Environment\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/yourusername/ec2-manager.git\ncd ec2-manager\n```\n\n2. Create a virtual environment:\n```bash\npython -m venv venv\nsource venv/bin/activate # On Windows: venv\\Scripts\\activate\n```\n\n3. Install development dependencies:\n```bash\npip install -e \".[dev]\"\n```\n\n### Running Tests\n\n```bash\npytest\n```\n\n### Code Formatting\n\n```bash\n# Format code\nblack src tests\n\n# Sort imports\nisort src tests\n\n# Check style\nflake8 src tests\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## Common Issues and Solutions\n\n### Issue: \"Unable to locate credentials\"\n- Ensure AWS credentials are configured: `aws configure`\n- Check `~/.aws/credentials` exists and has valid credentials\n\n### Issue: \"Permission denied (publickey)\"\n- Verify SSH key exists in configured path\n- Check key permissions (should be 600)\n- Confirm correct username for instance\n\n### Issue: \"Connection timed out\"\n- Verify security group rules\n- Check instance public IP is accessible\n- Ensure instance is running\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- AWS SDK for Python (Boto3)\n- The AWS CLI team for inspiration\n- All contributors and users\n\n## Support\n\nIf you encounter any issues or need support, please:\n\n1. Check the [Common Issues](#common-issues-and-solutions) section\n2. Search existing GitHub issues\n3. Create a new issue if needed\n\n\n## Project Status\n\nActive development - Accepting contributions\n\n## Author\n\nMeraj (meru.meraj64@gmail.com)\n\n---\n\nMade with \u2764\ufe0f by meraj64\n\n\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2024 Your Name\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "A CLI tool to manage and connect to AWS EC2 instances",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/meraj64/ec2-simple-connect"
},
"split_keywords": [
"aws",
" ec2",
" ssh",
" cli"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "cd30f74301da9a5984a4cd685779928c0ca4cd17848346b982a0e0fe5734f96f",
"md5": "484d4e91cf24a0b620a7b50902bbe95e",
"sha256": "199df5f7b6dab23dfa1f20138ad74941a04dfa32257989cd1a8f8688eb64822f"
},
"downloads": -1,
"filename": "ec2_simple_connect-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "484d4e91cf24a0b620a7b50902bbe95e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 9776,
"upload_time": "2025-08-25T03:19:11",
"upload_time_iso_8601": "2025-08-25T03:19:11.847663Z",
"url": "https://files.pythonhosted.org/packages/cd/30/f74301da9a5984a4cd685779928c0ca4cd17848346b982a0e0fe5734f96f/ec2_simple_connect-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e3d458f44884447fa852a96ad3a05e7ee8b4ded5b661da654cd95a2241ac05fa",
"md5": "684ea725a6198ff8b5f04eb55370d83b",
"sha256": "464c26ac74132480d906d5ae99d1cfe2d4318c3f733d9971f64f5d9f912f0e0f"
},
"downloads": -1,
"filename": "ec2_simple_connect-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "684ea725a6198ff8b5f04eb55370d83b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 8307,
"upload_time": "2025-08-25T03:19:13",
"upload_time_iso_8601": "2025-08-25T03:19:13.299387Z",
"url": "https://files.pythonhosted.org/packages/e3/d4/58f44884447fa852a96ad3a05e7ee8b4ded5b661da654cd95a2241ac05fa/ec2_simple_connect-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-25 03:19:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "meraj64",
"github_project": "ec2-simple-connect",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ec2-simple-connect"
}