| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A Python script to connect to AWS instances via SSH and perform directory operations using the uv package manager.
# On macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# Or using pip
pip install uv# Create virtual environment and install dependencies
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e .Create a .env file in your project directory:
# Copy the .env template and edit it
cp .env.example .env# Simple - uses .env file configuration
python aws_ssh_client.py
# Override specific values from .env
python aws_ssh_client.py --key ~/.ssh/different-key
# Enable verbose logging
python aws_ssh_client.py --verbose# Use .env file configuration (recommended)
python aws_ssh_client.py
# Override specific values from .env file
python aws_ssh_client.py --key ~/.ssh/different-key
python aws_ssh_client.py --host different-server.com
# Enable verbose logging
python aws_ssh_client.py --verbose
# If .env values are missing, script will prompt interactively
python aws_ssh_client.py
# AWS_SSH_HOST not found in .env file
# Enter AWS hostname/IP address: 34.229.96.55The script uses this priority order:
Add .env to .gitignore:
echo ".env" >> .gitignoreSet proper SSH key permissions:
chmod 600 ~/.ssh/aws-key-2025Use SSH agent (optional):
ssh-add ~/.ssh/aws-key-2025SSH Key Protection: Ensure your SSH private key has proper permissions (600)
chmod 600 ~/.ssh/aws-key-2025Key Management: Consider using SSH agent for better key management
ssh-add ~/.ssh/aws-key-2025Connection Security: The script uses paramiko with proper host key checking
Enable debug logging by modifying the logging level:
logging.basicConfig(level=logging.DEBUG)This will show detailed SSH connection information and command execution details.
| Back | FazBrowse Home | New Git URL |