# SSH Transport — keys, keepalive, resumable copy, secrets-via-stdin Platform-agnostic SSH + file-transfer substrate for every `ssh-rental` profile (AutoDL, RunPod, vast.ai, Lambda, Paperspace, China, bare SSH). One-time config so subsequent commands are short and password-less, plus the copy/secret patterns that survive flaky networks and short rentals. Concrete hosts, ports, and credential locations are **profile facts** — this file owns the *mechanism*, the profile (`profiles/.md` §1/§3/§8) owns the *values*. To jump: `grep -in '' references/ssh_transport.md` (e.g. `keepalive`, `rsync`, `stdin`, `crlf`). ## Table of contents 1. Key generation 2. Push the public key to an instance 3. `~/.ssh/config` alias + keepalive tuning 4. Verify the alias 5. Resumable copy — rsync vs scp, and WHY rsync 6. Bulk per-dir download loop 7. Move secrets via stdin — never inline a key, never on a durable FS 8. CRLF — `.sh` authored on Windows breaks on Linux 9. Two SSH flavors — proxied/basic SSH cannot `scp` 10. Transport gotchas (Symptom → Root cause → Fix) --- ## 1. Key generation Skip if `~/.ssh/id_ed25519` already exists. ```bash ssh-keygen -t ed25519 -C "