rtfm-filemanager 7.3.6 → 7.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,425 @@
1
+ # Remote SSH/SFTP Browsing
2
+
3
+ Complete guide to RTFM's remote directory browsing capabilities.
4
+
5
+ ## Overview
6
+
7
+ RTFM lets you browse and manage files on remote servers via SSH/SFTP as seamlessly as local directories. No need to open separate terminal windows or use command-line scp/sftp.
8
+
9
+ ## Quick Start
10
+
11
+ 1. Press `Ctrl-e` to enter remote mode
12
+ 2. Enter connection: `user@server.com:/path/to/directory`
13
+ 3. Navigate with normal keys
14
+ 4. Press `d` to download, `u` to upload
15
+ 5. Press `Ctrl-e` to return to local mode
16
+
17
+ ## Connection Formats
18
+
19
+ ### Basic SSH Connection
20
+
21
+ ```
22
+ user@hostname:/path/to/directory
23
+ ```
24
+
25
+ ### With Custom SSH Key
26
+
27
+ ```
28
+ -i ~/.ssh/custom-key user@hostname:/path
29
+ ```
30
+
31
+ Or:
32
+ ```
33
+ user@hostname:/path -i ~/.ssh/custom-key
34
+ ```
35
+
36
+ ### SSH URI Format
37
+
38
+ ```
39
+ ssh://user@hostname/path/to/directory
40
+ ```
41
+
42
+ ### IP Address
43
+
44
+ ```
45
+ user@192.168.1.100:/home/user
46
+ ```
47
+
48
+ ### With Comments (for organization)
49
+
50
+ ```
51
+ user@production.com:/var/www # Production server
52
+ admin@dev.local:/home # Development
53
+ backup@backup.server:/data # Backup server
54
+ ```
55
+
56
+ Comments help identify connections in history (`Ctrl-e` then select from list).
57
+
58
+ ## Remote Mode Operations
59
+
60
+ ### Navigation
61
+
62
+ | Key | Action |
63
+ |-----|--------|
64
+ | `↑` `↓` | Move through file list |
65
+ | `→` `ENTER` | Show file info |
66
+ | `←` `h` | Parent directory |
67
+ | `HOME` `END` | First / last item |
68
+
69
+ ### File Operations
70
+
71
+ | Key | Action |
72
+ |-----|--------|
73
+ | `d` | Download selected file |
74
+ | `u` | Upload tagged files |
75
+ | `s` | Open SSH shell in current directory |
76
+
77
+ **Note:** Copy, move, delete operations are disabled in remote mode for safety.
78
+
79
+ ### Information Display
80
+
81
+ Press `→` or `ENTER` on a file to see:
82
+ - File size
83
+ - Permissions
84
+ - Owner/group
85
+ - Modified date
86
+ - Full path
87
+
88
+ ## Downloading Files
89
+
90
+ ### Download Single File
91
+
92
+ 1. Navigate to file
93
+ 2. Press `d`
94
+ 3. File downloads to your current local directory
95
+
96
+ ### Download Multiple Files
97
+
98
+ 1. Tag files with `t`
99
+ 2. Press `d`
100
+ 3. All tagged files download
101
+
102
+ **Download location:** Current local directory (where you were before entering remote mode)
103
+
104
+ ## Uploading Files
105
+
106
+ ### Upload Tagged Files
107
+
108
+ 1. In local mode, tag files with `t`
109
+ 2. Press `Ctrl-e` to enter remote mode
110
+ 3. Navigate to destination directory
111
+ 4. Press `u` to upload all tagged files
112
+
113
+ ### Upload Workflow Example
114
+
115
+ ```bash
116
+ # Local mode
117
+ r # Launch RTFM
118
+ # Navigate to files to upload
119
+ t t t # Tag 3 files
120
+ Ctrl-e # Enter remote mode
121
+ user@server:/uploads # Connect
122
+ # Navigate to destination
123
+ u # Upload tagged files
124
+ ```
125
+
126
+ ## SSH Shell Integration
127
+
128
+ ### Opening SSH Shell
129
+
130
+ While in remote mode:
131
+ 1. Navigate to desired directory
132
+ 2. Press `s`
133
+ 3. Interactive SSH shell opens in that directory
134
+
135
+ ### In SSH Shell
136
+
137
+ - Full interactive shell session
138
+ - All normal shell commands work
139
+ - Exit shell with `exit` or `Ctrl-d`
140
+ - Returns to RTFM automatically
141
+
142
+ **Use case:** Quick edits, running scripts, checking logs
143
+
144
+ ## Connection Caching
145
+
146
+ RTFM caches remote directory listings for 60 seconds to improve performance.
147
+
148
+ **Force refresh:**
149
+ - Press `r` to refresh current directory
150
+ - Change directories and return
151
+
152
+ ## SSH Configuration
153
+
154
+ ### SSH Key Setup
155
+
156
+ For passwordless access, set up SSH keys:
157
+
158
+ ```bash
159
+ # Generate key (if you don't have one)
160
+ ssh-keygen -t ed25519
161
+
162
+ # Copy to server
163
+ ssh-copy-id user@server.com
164
+ ```
165
+
166
+ ### Persistent Connections
167
+
168
+ Speed up repeated connections in `~/.ssh/config`:
169
+
170
+ ```
171
+ Host production
172
+ HostName production.example.com
173
+ User deployuser
174
+ IdentityFile ~/.ssh/production_key
175
+ ControlMaster auto
176
+ ControlPath ~/.ssh/control-%r@%h:%p
177
+ ControlPersist 10m
178
+
179
+ Host *.local
180
+ User admin
181
+ ControlMaster auto
182
+ ControlPersist 5m
183
+ ```
184
+
185
+ Then in RTFM: `Ctrl-e` → `production:/var/www`
186
+
187
+ ## Connection History
188
+
189
+ RTFM saves recent SSH connections in `@sshhistory`.
190
+
191
+ **Prepopulate connections:**
192
+
193
+ ```ruby
194
+ # ~/.rtfm/conf
195
+ @sshhistory = [
196
+ "user@production.com:/var/www # Production",
197
+ "admin@staging.com:/var/www # Staging",
198
+ "user@backup.server:/backups # Backups"
199
+ ]
200
+ ```
201
+
202
+ **Access history:**
203
+ 1. Press `Ctrl-e`
204
+ 2. See list of recent connections
205
+ 3. Select connection or enter new one
206
+
207
+ ## Use Cases
208
+
209
+ ### Remote Log Monitoring
210
+
211
+ ```
212
+ Ctrl-e → server:/var/log → Navigate to log → ENTER (view content)
213
+ ```
214
+
215
+ ### Deploy Files
216
+
217
+ ```
218
+ Tag local files → Ctrl-e → server:/var/www → u (upload)
219
+ ```
220
+
221
+ ### Backup Files
222
+
223
+ ```
224
+ Ctrl-e → server:/data → Tag files → d (download)
225
+ ```
226
+
227
+ ### Quick Config Edit
228
+
229
+ ```
230
+ Ctrl-e → server:/etc → Navigate to config → s (shell) → vim config
231
+ ```
232
+
233
+ ### Multi-Server File Distribution
234
+
235
+ ```
236
+ Tag files locally → Ctrl-e → server1:/dest → u (upload)
237
+ Ctrl-e → server2:/dest → u (upload again)
238
+ ```
239
+
240
+ ## Troubleshooting
241
+
242
+ ### Connection Fails
243
+
244
+ **Check SSH access:**
245
+ ```bash
246
+ ssh user@hostname
247
+ ```
248
+
249
+ If this works, RTFM should work.
250
+
251
+ **Common issues:**
252
+ - Wrong username or hostname
253
+ - SSH key not configured
254
+ - Firewall blocking port 22
255
+ - Path doesn't exist on server
256
+
257
+ ### Slow Performance
258
+
259
+ 1. **Enable SSH connection caching** (see SSH Configuration above)
260
+ 2. **Use SSH config aliases** for complex connections
261
+ 3. **Reduce SFTP overhead** with persistent connections
262
+
263
+ ### Permission Denied
264
+
265
+ - Check user has access to remote directory
266
+ - Verify SSH key permissions: `chmod 600 ~/.ssh/id_*`
267
+ - Check server's `~/.ssh/authorized_keys`
268
+
269
+ ### Files Don't Appear
270
+
271
+ - Press `r` to refresh directory listing
272
+ - Check if files exist: Press `s` to open shell, run `ls`
273
+
274
+ ### Upload Fails
275
+
276
+ - Check destination directory exists and is writable
277
+ - Verify sufficient disk space on server
278
+ - Check file permissions locally
279
+
280
+ ## Advanced SSH Techniques
281
+
282
+ ### Jump Hosts
283
+
284
+ Configure in `~/.ssh/config`:
285
+ ```
286
+ Host production
287
+ HostName internal.server.com
288
+ ProxyJump jumphost.example.com
289
+ User deployuser
290
+ ```
291
+
292
+ Then: `Ctrl-e` → `production:/path`
293
+
294
+ ### Port Forwarding
295
+
296
+ ```
297
+ Host database
298
+ HostName localhost
299
+ Port 5432
300
+ User postgres
301
+ LocalForward 5432 db.internal:5432
302
+ ProxyJump jumphost
303
+ ```
304
+
305
+ ### Multiple Identities
306
+
307
+ ```ruby
308
+ # Different keys for different servers
309
+ @sshhistory = [
310
+ "-i ~/.ssh/work_key user@work.com:/projects",
311
+ "-i ~/.ssh/personal_key user@personal.com:/files"
312
+ ]
313
+ ```
314
+
315
+ ## Security Considerations
316
+
317
+ ### Best Practices
318
+
319
+ 1. **Use SSH keys** - Never use password authentication
320
+ 2. **Restrict key permissions** - `chmod 600 ~/.ssh/id_*`
321
+ 3. **Use different keys** - Different keys for different servers
322
+ 4. **Limited user accounts** - Don't use root for SFTP
323
+ 5. **Monitor uploads** - Review what you're uploading
324
+
325
+ ### What RTFM Sends
326
+
327
+ RTFM uses standard SFTP protocol - same as:
328
+ ```bash
329
+ sftp user@hostname
330
+ ```
331
+
332
+ No passwords are stored. SSH key authentication only.
333
+
334
+ ## Performance Tips
335
+
336
+ ### Faster Browsing
337
+
338
+ 1. **Persistent connections** - Configure ControlMaster (see above)
339
+ 2. **Compression** - Add to `~/.ssh/config`: `Compression yes`
340
+ 3. **Disable strict checking** - For trusted networks: `StrictHostKeyChecking accept-new`
341
+
342
+ ### Large File Transfers
343
+
344
+ For very large files, consider using rsync outside RTFM:
345
+ ```bash
346
+ rsync -avP largefile.tar.gz user@server:/path/
347
+ ```
348
+
349
+ RTFM is optimized for browsing and quick file transfers, not bulk data transfer.
350
+
351
+ ## Limitations
352
+
353
+ **Remote mode restrictions:**
354
+ - No file deletion (safety)
355
+ - No file moving (safety)
356
+ - No permission changes (safety)
357
+ - Read-only except download/upload
358
+
359
+ **Why?** Safety first. Use SSH shell (`s` key) for destructive operations.
360
+
361
+ ## Examples
362
+
363
+ ### Example 1: Deploy Website
364
+
365
+ ```
366
+ # Local: Tag files to deploy
367
+ t t t (tag HTML, CSS, JS)
368
+
369
+ # Enter remote mode
370
+ Ctrl-e
371
+ user@webserver:/var/www/html
372
+
373
+ # Upload
374
+ u
375
+
376
+ # Verify
377
+ → (check file info)
378
+
379
+ # Exit
380
+ Ctrl-e
381
+ ```
382
+
383
+ ### Example 2: Download Logs
384
+
385
+ ```
386
+ # Connect to server
387
+ Ctrl-e
388
+ admin@logserver:/var/log
389
+
390
+ # Tag logs
391
+ t t t
392
+
393
+ # Download
394
+ d
395
+
396
+ # Exit and analyze locally
397
+ Ctrl-e
398
+ ```
399
+
400
+ ### Example 3: Quick Config Edit
401
+
402
+ ```
403
+ # Connect
404
+ Ctrl-e
405
+ root@server:/etc
406
+
407
+ # Navigate to config
408
+ # (use arrow keys)
409
+
410
+ # Open shell
411
+ s
412
+
413
+ # Edit
414
+ vim nginx.conf
415
+
416
+ # Exit shell (back to RTFM)
417
+ exit
418
+
419
+ # Exit remote mode
420
+ Ctrl-e
421
+ ```
422
+
423
+ ---
424
+
425
+ [← Configuration](configuration.md) | [Next: Keyboard Reference →](keyboard-reference.md)