No description
| .idea | ||
| .kotlin/errors | ||
| app | ||
| gradle | ||
| .gitignore | ||
| build.gradle.kts | ||
| DECISIONS.md | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| README.md | ||
| settings.gradle.kts | ||
SSHdroid Phase 2 (Functional Wiring)
Android SSH client prototype with local-first persistence, SSH transport, host-key verification, key management, jump-chain model, and runtime session management.
Current Scope
- Implements Phase 2 MUST-first scope.
- Defers SFTP browser and port forwarding (visible as disabled/deferred in UI).
- Uses local device storage only (no cloud sync/telemetry).
Tech Stack
- UI: Jetpack Compose + Material 3
- Persistence: Room (hosts, chains, keys metadata, known_hosts, history)
- Preferences: DataStore
- SSH transport: SSHJ
- Key storage: app-private encrypted blobs + Android Keystore-backed app key
- Background runtime: Foreground service with persistent notification while sessions are active
Build
./gradlew :app:assembleDebug
Test
./gradlew :app:testDebugUnitTest
Functional Flows
- Add one or more hosts in
Hosts. - Add optional jump chain in
Hosts > Jump Chainsand assign it to a target host. - Create a key in
Keysand assign it to host auth. - Open
Connection Previewand connect. - Use
Terminalfor interactive shell input and the run-command dialog for non-interactive execution. - View active sessions/history in
Sessions.
Test Host Setup (OpenSSH)
On a Linux/macOS host with OpenSSH server:
- Ensure
sshdis running and reachable from device/emulator. - Create a test account and key auth:
ssh-keygen -t ed25519 -f ~/.ssh/sshdroid_test
cat ~/.ssh/sshdroid_test.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
- Add host in app with username/hostname/port and import or generate key as needed.
Jump Chains
- Chains are ordered host hops assigned to target hosts.
- The app validates each hop and records hop-indexed failures.
- Failure details are redacted before UI/log exposure.
Biometric Key Protection
- Keys can be marked biometric-protected.
- Protected keys require biometric-approved usage path before connect/export operations.
- Unlock policy options: always prompt or cache windows (5/15/60 min metadata policy).
Host Key Verification
Per-host known_hosts policy:
ASK(TOFU): prompt on first sight.STRICT: reject unknown keys.ACCEPT_NEW: accept first key automatically.
Changed host keys always trigger a high-friction decision prompt and default reject behavior if no decision is made.
Session History
Local-only history includes:
- host + chain summary
- start/end/duration
- outcome and failed hop (if any)
History intentionally excludes command output and keystrokes.
Diagnostics and Redaction
- Diagnostic logging is explicit and time-limited (30 minutes).
- Sensitive tokens are redacted (
user@host, IP addresses, SHA256 fingerprints).
Log/Data Locations
- Room DB: app internal database (
sshdroid.db) - Key blobs: app internal files under
files/ssh_keys/ - UI settings: DataStore preferences (
ui_settings)
Deferred Items
- SFTP browser: deferred, disabled placeholder in UI.
- Port forwarding (
-L,-D): deferred. - Full OpenSSH config import/export and backup/restore bundle: deferred.