# ssh-linux-deploy > Deploy a local project to a Linux server over SSH using connection details from a .env file, with upload, server load checks, and README-based deployment steps. Use when Codex needs to publish or deploy a project to a remote Linux host via SSH/SFTP and must follow README deployment instructions. - Author: frogchou - Repository: frogchou/skills - Version: 20260127141436 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/frogchou/skills - Web: https://mule.run/skillshub/@@frogchou/skills~ssh-linux-deploy:20260127141436 --- --- name: ssh-linux-deploy description: Deploy a local project to a Linux server over SSH using connection details from a .env file, with upload, server load checks, and README-based deployment steps. Use when Codex needs to publish or deploy a project to a remote Linux host via SSH/SFTP and must follow README deployment instructions. --- # SSH Linux Deploy ## Setup - Copy `.env.example` to `.env` in the skill root (same folder as `SKILL.md`). - Fill required keys: `SSH_HOST`, `SSH_PORT`, `SSH_USER`, `SSH_PASSWORD`, `PROJECT_PATH`, `REMOTE_PATH`. - Optional: `EXCLUDE` (comma-separated glob patterns). - Install Paramiko if missing: `python -m pip install paramiko`. ## Workflow 1. Identify the project root and confirm a README with deployment instructions exists. 2. If README is missing or the deployment method is unclear, stop and report. 3. Run the upload script to connect, check load, and upload (stop if load > 70). 4. Execute the README commands on the server (use `--execute` only if commands are safe and clear). ## Script: scripts/ssh_deploy.py - Read `.env` from the skill root unless `--env` is provided. - Extract deployment commands from a deployment section in README. - Abort if server load percent (load1 / CPU cores * 100) is > 70. - Upload the project via SFTP. - If `--execute` is set, run extracted commands under `REMOTE_PATH`. ## Example commands ```bash python scripts/ssh_deploy.py --project /path/to/project --remote-path /opt/apps/myapp python scripts/ssh_deploy.py --execute ```