@@ -37,7 +37,33 @@ Your SSH private keys are stored encrypted. They can only be decrypted after Tou
3737
3838## Quick Start
3939
40- ### Step 1: Install
40+ ### Option A: Interactive Setup Wizard (Recommended)
41+
42+ The easiest way to get started - one command does everything:
43+
44+ ``` bash
45+ # Build the project
46+ go build ./cmd/fssh
47+
48+ # Run interactive setup wizard
49+ ./fssh init
50+ ```
51+
52+ The wizard will guide you through:
53+ 1 . ** Choose authentication mode** - Touch ID or OTP
54+ 2 . ** Install binary** - Automatically copies fssh to /usr/local/bin
55+ 3 . ** Import SSH keys** - Scans and imports keys from ~ /.ssh/
56+ 4 . ** Configure auto-start** - Sets up LaunchAgent for automatic startup
57+ 5 . ** Start agent** - Launches fssh agent immediately
58+ 6 . ** Configure SSH client** - Updates ~ /.ssh/config automatically
59+
60+ After completion, you're ready to use SSH with Touch ID/OTP authentication!
61+
62+ ### Option B: Manual Setup (Advanced)
63+
64+ For users who prefer step-by-step control:
65+
66+ #### Step 1: Install
4167
4268``` bash
4369# After downloading the source code, build it
@@ -47,7 +73,7 @@ go build ./cmd/fssh
4773sudo cp fssh /usr/local/bin/
4874```
4975
50- ### Step 2: Initialize
76+ #### Step 2: Initialize
5177
5278Choose an authentication mode based on your device:
5379
@@ -68,7 +94,7 @@ During OTP mode initialization:
68942 . A TOTP secret will be displayed - add it to an authenticator app (e.g., Google Authenticator, Authy)
69953 . 10 recovery codes will be shown - ** save them securely**
7096
71- ### Step 3: Import SSH Private Key
97+ #### Step 3: Import SSH Private Key
7298
7399``` bash
74100# Import your SSH private key (you'll be prompted for passphrase if the key has one)
@@ -80,15 +106,15 @@ Parameters:
80106- ` --file ` : Path to the private key file
81107- ` --ask-passphrase ` : Add this if the private key is passphrase-protected
82108
83- ### Step 4: Start the Agent
109+ #### Step 4: Start the Agent
84110
85111``` bash
86112fssh agent
87113```
88114
89115Once started, the Agent runs in the background, listening on ` ~/.fssh/agent.sock ` .
90116
91- ### Step 5: Configure SSH to Use fssh Agent
117+ #### Step 5: Configure SSH to Use fssh Agent
92118
93119Edit ` ~/.ssh/config ` and add at the ** very beginning** :
94120
@@ -99,7 +125,7 @@ Host *
99125
100126This routes all SSH connections through fssh Agent.
101127
102- ### Step 6: Start Using
128+ #### Step 6: Start Using
103129
104130``` bash
105131# Use SSH normally - Touch ID or OTP prompt will appear automatically
@@ -108,6 +134,70 @@ ssh user@yourserver.com
108134
109135---
110136
137+ ## Interactive Setup Wizard Details
138+
139+ The interactive wizard (` fssh init ` ) performs the following steps:
140+
141+ ### Step-by-step Process
142+
143+ ** Step 1: Welcome & Initialization Check**
144+ - Displays welcome banner
145+ - Checks if fssh is already initialized
146+ - Prompts for confirmation if reinitializing
147+
148+ ** Step 2: Choose Authentication Mode**
149+ - Auto-detects Touch ID availability on your Mac
150+ - Prompts you to choose between:
151+ - Touch ID (recommended for supported devices)
152+ - OTP (for devices without Touch ID or additional security)
153+
154+ ** Step 3: Initialize Authentication**
155+ - Executes the selected authentication mode setup
156+ - For Touch ID: Generates and stores master key in macOS Keychain
157+ - For OTP: Sets up password + TOTP with recovery codes
158+
159+ ** Step 4: Binary Installation**
160+ - Detects current executable location
161+ - Copies fssh to ` /usr/local/bin/ ` (requires sudo)
162+ - Sets proper permissions (755)
163+
164+ ** Step 5: Import SSH Keys**
165+ - Scans ` ~/.ssh/ ` directory for private keys
166+ - Detects standard key files: ` id_rsa ` , ` id_ed25519 ` , ` id_ecdsa ` , etc.
167+ - Identifies encrypted vs unencrypted keys
168+ - Prompts for each key:
169+ - Suggested alias (e.g., ` id_ed25519 ` → ` ed25519 ` )
170+ - Passphrase if key is encrypted
171+ - Imports keys with encryption protection
172+
173+ ** Step 6: Configure LaunchAgent**
174+ - Creates plist file at ` ~/Library/LaunchAgents/com.fssh.agent.plist `
175+ - Loads LaunchAgent for auto-start on login
176+ - Configures agent to keep running
177+
178+ ** Step 7: Start Agent**
179+ - Waits for agent to start (up to 10 seconds)
180+ - Verifies socket connection at ` ~/.fssh/agent.sock `
181+
182+ ** Step 8: Configure SSH Client**
183+ - Prompts to update ` ~/.ssh/config `
184+ - Creates backup before modification
185+ - Prepends ` IdentityAgent ` configuration for automatic SSH integration
186+
187+ ### Non-Interactive Mode
188+
189+ For automation, scripts, or CI/CD:
190+
191+ ``` bash
192+ # Skip all interactive prompts
193+ fssh init --non-interactive --mode touchid
194+
195+ # Or specify mode directly
196+ fssh init --mode otp
197+ ```
198+
199+ ---
200+
111201## Auto-Start on Login
112202
113203Tired of manually starting the Agent after each reboot? Set up auto-start:
@@ -161,14 +251,29 @@ fssh> exit # Exit the shell
161251
162252## Command Reference
163253
254+ ### Initialization Commands
255+
256+ | Command | Description |
257+ | ---------| -------------|
258+ | ` fssh init ` | Interactive setup wizard (recommended) |
259+ | ` fssh init --interactive ` | Explicitly run interactive wizard |
260+ | ` fssh init --mode touchid ` | Initialize with Touch ID (non-interactive) |
261+ | ` fssh init --mode otp ` | Initialize with OTP (non-interactive) |
262+ | ` fssh init --non-interactive --mode touchid ` | Non-interactive mode for scripts/CI |
263+
264+ ### Key Management
265+
164266| Command | Description |
165267| ---------| -------------|
166- | ` fssh init --mode touchid ` | Initialize (Touch ID mode) |
167- | ` fssh init --mode otp ` | Initialize (OTP mode) |
168268| ` fssh import --alias name --file path --ask-passphrase ` | Import a private key |
169269| ` fssh list ` | List imported keys |
170270| ` fssh export --alias name --out path ` | Export a key (backup) |
171271| ` fssh remove --alias name ` | Remove a key |
272+
273+ ### Agent & Shell
274+
275+ | Command | Description |
276+ | ---------| -------------|
172277| ` fssh agent ` | Start the Agent |
173278| ` fssh status ` | Check status |
174279| ` fssh shell ` | Enter interactive shell |
0 commit comments