-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpcm_help_en.html
More file actions
1380 lines (1193 loc) · 73.9 KB
/
Copy pathpcm_help_en.html
File metadata and controls
1380 lines (1193 loc) · 73.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>PCM — Complete Guide</title>
<style>
* { box-sizing: border-box; }
:root {
--blue-deep: #0f2744;
--blue-mid: #1a4a8a;
--blue-acc: #2f7dd6;
--blue-light: #4e9ef5;
--blue-pale: #ddeeff;
--green: #1a7a4a;
--green-pale: #e2f5eb;
--amber: #b05800;
--amber-pale: #fff3e0;
--red: #c0271a;
--red-pale: #fdecea;
--teal: #0d7a6e;
--teal-pale: #e0f5f3;
--fg: #1a1f2e;
--fg-muted: #4a5368;
--border: #d0d9ea;
--bg: #f6f8fc;
--bg-card: #ffffff;
--mono: 'JetBrains Mono', 'Fira Code', 'DejaVu Sans Mono', 'Courier New', monospace;
--sans: 'Liberation Sans', 'FreeSans', 'DejaVu Sans', 'Noto Sans', Arial, sans-serif;
}
body {
font-family: var(--sans);
font-size: 13.5px;
color: var(--fg);
background: var(--bg);
margin: 0;
padding: 0;
line-height: 1.65;
}
/* ── HEADER ─────────────────────────────────────────────────────── */
.header {
background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-mid) 60%, #1d5ea8 100%);
color: #fff;
padding: 36px 48px 28px;
position: relative;
overflow: hidden;
}
.header::after {
content: '';
position: absolute;
right: -60px; top: -60px;
width: 320px; height: 320px;
border-radius: 50%;
background: rgba(255,255,255,0.04);
}
.header h1 {
margin: 0 0 6px;
font-size: 27px;
font-weight: 700;
letter-spacing: -0.3px;
}
.header .sub { margin: 0; font-size: 13px; opacity: 0.75; }
.header .meta { margin-top: 10px; font-size: 11px; opacity: 0.5; font-family: var(--mono); }
/* ── NAVIGATION ──────────────────────────────────────────────────── */
.toc {
background: #e8eef8;
border-bottom: 2px solid var(--border);
padding: 0 48px;
display: flex;
flex-wrap: wrap;
}
.toc a {
color: var(--blue-mid);
text-decoration: none;
font-size: 11.5px;
font-weight: 600;
padding: 10px 15px;
display: inline-block;
border-right: 1px solid var(--border);
white-space: nowrap;
transition: background 0.15s;
}
.toc a:hover { background: #d0dcf4; }
.toc a.new::after {
content: 'NEW';
font-size: 9px;
background: var(--blue-acc);
color: #fff;
border-radius: 3px;
padding: 1px 4px;
margin-left: 5px;
vertical-align: middle;
}
/* ── CONTENT LAYOUT ──────────────────────────────────────────────── */
.content { padding: 12px 48px 60px; max-width: 980px; }
/* ── HEADINGS ────────────────────────────────────────────────────── */
h2 {
color: var(--blue-deep);
font-size: 19px;
font-weight: 700;
border-bottom: 3px solid var(--blue-acc);
padding-bottom: 7px;
margin: 44px 0 18px;
}
h2 .new-badge {
display: inline-block;
background: var(--blue-acc);
color: #fff;
font-size: 10px;
font-weight: 700;
border-radius: 4px;
padding: 2px 7px;
margin-left: 10px;
vertical-align: middle;
letter-spacing: 0.5px;
}
h3 {
color: var(--blue-mid);
font-size: 14.5px;
font-weight: 700;
margin: 26px 0 10px;
padding-left: 12px;
border-left: 3px solid var(--blue-acc);
}
h4 {
color: #2c4a7a;
font-size: 13px;
font-weight: 700;
margin: 18px 0 7px;
}
p { margin: 8px 0 12px; }
ul, ol { margin: 6px 0 13px 22px; }
li { margin-bottom: 5px; }
ul ul { margin-top: 4px; margin-bottom: 4px; }
/* ── CODE ────────────────────────────────────────────────────────── */
code {
background: #e4eaf7;
border: 1px solid #c2cedf;
border-radius: 3px;
padding: 1px 5px;
font-family: var(--mono);
font-size: 11.5px;
color: #1a3870;
}
pre {
background: #111827;
color: #c8d8f8;
border-radius: 7px;
padding: 16px 20px;
font-family: var(--mono);
font-size: 11.5px;
margin: 12px 0 18px;
overflow-x: auto;
line-height: 1.75;
border: 1px solid #1e2e48;
}
pre .cm { color: #6a8eb0; }
pre .kw { color: #82d3f8; }
pre .str { color: #a8d8a8; }
pre .var { color: #ffd08a; }
/* ── KEYBOARD KEYS ───────────────────────────────────────────────── */
kbd {
display: inline-block;
background: #edf0f7;
border: 1px solid #b8c4d8;
border-bottom: 2.5px solid #94a8c4;
border-radius: 4px;
padding: 1px 7px;
font-family: var(--mono);
font-size: 11px;
color: #1a3060;
white-space: nowrap;
}
/* ── PROTOCOL BADGES ─────────────────────────────────────────────── */
.badge {
display: inline-block;
padding: 2px 9px;
border-radius: 10px;
font-size: 11px;
font-weight: 700;
color: #fff;
margin-right: 4px;
vertical-align: middle;
letter-spacing: 0.3px;
}
.b-ssh { background: #1a9e8a; }
.b-sftp { background: #2a8a5a; }
.b-ftp { background: #b06a00; }
.b-rdp { background: #0060b0; }
.b-vnc { background: #c08000; }
.b-tel { background: #8a8020; }
.b-tun { background: #7050a0; }
.b-mosh { background: #1a8888; }
.b-ser { background: #606060; }
/* ── TABLES ──────────────────────────────────────────────────────── */
table {
border-collapse: collapse;
width: 100%;
margin: 12px 0 20px;
font-size: 12.5px;
}
th {
background: var(--blue-deep);
color: #fff;
padding: 8px 12px;
text-align: left;
font-weight: 600;
font-size: 11.5px;
}
td {
padding: 7px 12px;
border-bottom: 1px solid var(--border);
vertical-align: top;
}
tr:nth-child(even) td { background: #f0f4fc; }
tr:hover td { background: #e4ecf8; }
/* ── CALLOUT BOXES ───────────────────────────────────────────────── */
.tip, .warn, .info, .danger {
border-left: 5px solid;
border-radius: 0 7px 7px 0;
padding: 13px 18px;
margin: 14px 0;
font-size: 12.5px;
}
.tip { background: var(--green-pale); border-color: var(--green); }
.warn { background: var(--amber-pale); border-color: var(--amber); }
.info { background: var(--blue-pale); border-color: var(--blue-acc); }
.danger { background: var(--red-pale); border-color: var(--red); }
/* ── NEW FEATURE BOX ─────────────────────────────────────────────── */
.new-feature {
background: var(--teal-pale);
border: 1px solid #a0d8d4;
border-left: 5px solid var(--teal);
border-radius: 0 8px 8px 0;
padding: 14px 18px;
margin: 16px 0;
}
.nf-title {
font-weight: 700;
color: var(--teal);
font-size: 13.5px;
margin-bottom: 6px;
}
.nf-title::before { content: '✦ NEW — '; }
/* ── PROTOCOL BLOCKS ─────────────────────────────────────────────── */
.proto-block {
background: var(--bg-card);
border-left: 5px solid var(--blue-acc);
border-radius: 0 7px 7px 0;
padding: 15px 20px;
margin: 15px 0;
box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.proto-block.ssh { border-left-color: #1a9e8a; }
.proto-block.sftp { border-left-color: #2a8a5a; }
.proto-block.ftp { border-left-color: #b06a00; }
.proto-block.rdp { border-left-color: #0060b0; }
.proto-block.vnc { border-left-color: #c08000; }
.proto-block.tel { border-left-color: #8a8020; }
.proto-block.tun { border-left-color: #7050a0; }
.proto-block.mosh { border-left-color: #1a8888; }
.proto-block.ser { border-left-color: #606060; }
.proto-title { font-size: 14.5px; font-weight: 700; margin: 0 0 8px; }
.proto-desc { color: var(--fg-muted); font-size: 12.5px; margin: 3px 0 11px; }
/* ── UI BOX (ASCII diagram) ──────────────────────────────────────── */
.screenshot-label {
background: var(--blue-mid);
color: #fff;
font-size: 11px;
font-weight: 600;
padding: 3px 12px;
border-radius: 4px 4px 0 0;
display: inline-block;
margin-bottom: -1px;
font-family: var(--mono);
}
.ui-box {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 0 6px 6px 6px;
padding: 14px 18px;
margin: 0 0 18px;
font-size: 11.5px;
font-family: var(--mono);
line-height: 1.85;
color: #1a2a4a;
}
/* ── MENU PATH ───────────────────────────────────────────────────── */
.menu-path {
display: inline-flex;
align-items: center;
gap: 4px;
background: #eef2fb;
border: 1px solid var(--border);
border-radius: 4px;
padding: 2px 8px;
font-size: 12px;
font-weight: 600;
color: var(--blue-mid);
}
.menu-path span { color: #8fa0bc; font-weight: 400; }
hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
/* ── FOOTER ──────────────────────────────────────────────────────── */
.footer {
background: var(--blue-deep);
color: #7090b8;
padding: 16px 48px;
font-size: 11px;
text-align: center;
font-family: var(--mono);
}
.footer a { color: #6ab4f0; }
</style>
</head>
<body>
<!-- ══════════════════════════════════════════════════ HEADER -->
<div class="header">
<h1>🚀 PCM — Python Connection Manager</h1>
<p class="sub">Complete Guide · Multi-protocol remote session manager for Linux</p>
<p class="meta">Protocols: SSH · SFTP · FTP/FTPS · RDP · VNC · Telnet · Mosh · Serial · Exec · GTK3 version (active development)</p>
</div>
<!-- ══════════════════════════════════════════════════ TABLE OF CONTENTS -->
<div class="toc">
<a href="#interface">🖥 Interface</a>
<a href="#sessions">📋 Sessions</a>
<a href="#protocols">🔌 Protocols</a>
<a href="#authentication">🔑 Authentication</a>
<a href="#import">📥 Import</a>
<a href="#terminal">⌨ Terminal</a>
<a href="#sftp">📁 SFTP/FTP</a>
<a href="#tunnel">🔀 Tunnel</a>
<a href="#advanced">⚙ Advanced</a>
<a href="#monitor">📊 SSH Monitor</a>
<a href="#keys">⌨ Shortcuts</a>
<a href="#settings">🛠 Settings</a>
<a href="#faq">❓ FAQ</a>
<a href="#cli">⌨ CLI</a>
</div>
<div class="content">
<!-- ══════════════════════════════════════════════════ INTERFACE -->
<h2 id="interface">🖥 Main Interface</h2>
<p>PCM organizes its interface into clearly distinct and customizable areas:</p>
<div class="screenshot-label">PCM Layout</div>
<div class="ui-box">
┌─────────────────────────────────────────────────────────────────┐
│ File View Tools ? [menu bar] │
├─────────────────────────────────────────────────────────────────┤
│ [Session] [Local] │ [Tunnel] │ [Settings] │ [Split ▼] │
├─────────────────────────────────────────────────────────────────┤
│ Quick Connect: [SSH ▼] [user@host:port.................] [▶] │
├──────────────┬──────────────────────────────────────────────────┤
│ Sessions │ 🏠 Welcome │ SSH: server1 │ SFTP: nas │
│ ─────────── │ │
│ 📂 Home │ (terminal area / active tab content) │
│ ● server1 │ │
│ ● nas │ │
│ 📂 Work │ │
│ ● webserver│ │
│ ● dbserver │ │
└──────────────┴──────────────────────────────────────────────────┘
</div>
<h3>Menu bar</h3>
<ul>
<li><b>File</b> — new session, local terminal, import/export sessions JSON, settings, quit</li>
<li><b>View</b> — show/hide sidebar, split mode</li>
<li><b>Tools</b> — SSH Tunnel Manager, multi-exec, global variables, global password (credential encryption), local FTP server, import from external apps, protected mode, check dependencies, <b>Broadcast terminals</b>, <b>Audit log</b>, <b>KeePassXC</b>, <b>Snippet Library</b></li>
<li><b>?</b> — this guide (<kbd>F1</kbd>), about PCM</li>
</ul>
<h3>Sessions sidebar</h3>
<ul>
<li><b>⏱ Recent</b> section at the top (when no filter is active) — last 20 sessions with date/time of last connection</li>
<li>Sessions grouped by group, sorted alphabetically</li>
<li>Each row shows protocol icon, name and <code>user@host</code></li>
<li>Live search field — filters by name, host and user</li>
<li>Right-click on the <b>⏱ Recent</b> group → <b>Clear history</b></li>
<li><b><span style="color:#22cc55">●</span> Active indicator</b> — sessions with an open connection show a green dot next to their name</li>
<li>Panel width is adjustable by dragging the separator</li>
</ul>
<h3>Toolbar</h3>
<p>The toolbar below the menu bar provides quick access to the main functions:</p>
<ul>
<li><b>New Session</b> — opens the dialog to create a new connection</li>
<li><b>Local Terminal</b> — opens a local terminal tab</li>
<li><b>Tunnel Indicator</b> — shows the number of active SSH tunnels; click to open a popup listing each active tunnel with an individual <b>Stop</b> button; the indicator refreshes automatically every 3 seconds. The full Tunnel Manager is accessible from the popup or via <span class="menu-path">Tools <span>›</span> SSH Tunnels…</span></li>
<li><b>Settings</b> — opens the settings dialog</li>
<li><b>Split ▼</b> — split the terminal area vertically or horizontally</li>
</ul>
<h3>Quick Connect</h3>
<p>The bar below the toolbar allows you to quickly connect without saving the session:</p>
<ul>
<li>Select protocol from the drop-down menu (SSH, Telnet, Mosh, Serial…)</li>
<li>Enter <code>user@host:port</code> (port is optional, uses default)</li>
<li>Press <kbd>Enter</kbd> or click ▶ to connect</li>
</ul>
<h3>Tabs (Notebook)</h3>
<p>Each active connection opens in a separate tab. You can:</p>
<ul>
<li><b>Drag</b> tabs to reorder them</li>
<li><b>Right-click</b> on a tab to access the context menu:
<ul>
<li><b>Move to other panel</b> — move tab to the split panel</li>
<li><b>Open file transfer here</b> — opens SFTP/FTP reusing session credentials</li>
<li><b>⧉ Duplicate connection</b> — opens a second session to the same host</li>
<li><b>✖ Close tab</b> — closes the session</li>
</ul>
</li>
<li><kbd>Ctrl+W</kbd> — close current tab</li>
</ul>
<h3>Split panels</h3>
<p>The terminal area can be split into two panels (vertical or horizontal) via <b>Split ▼</b> in the toolbar or via <span class="menu-path">View <span>›</span> Split</span>. Drag a tab into the second panel to work on two sessions simultaneously.</p>
<ul>
<li><b>Single view</b> <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>1</kbd></li>
<li><b>Vertical split</b> <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>2</kbd> — two panels side by side</li>
<li><b>Horizontal split</b> <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>3</kbd> — two panels stacked</li>
</ul>
<h3>System Tray</h3>
<p>With active sessions, closing the window minimizes PCM to the system tray instead of terminating connections.</p>
<ul>
<li><b>Double-click</b> on the icon — reopens the main window</li>
<li><b>Right-click</b> on the icon — menu with quick access to the last 8 used sessions and Quit option</li>
</ul>
<!-- ══════════════════════════════════════════════════ SESSIONS -->
<h2 id="sessions">📋 Session Management</h2>
<h3>Create a new session</h3>
<p>Click <b>➕</b> in the sidebar, or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>N</kbd>. The dialog contains:</p>
<div class="step"><div class="step-num">1</div><div class="step-text">Assign a <b>Name</b> (e.g. <i>Production server</i>) and an optional <b>Group</b> (e.g. <i>Work</i>).</div></div>
<div class="step"><div class="step-num">2</div><div class="step-text">Choose the <b>Protocol</b> — the dialog adapts showing only relevant fields.</div></div>
<div class="step"><div class="step-num">3</div><div class="step-text"><b>Connection</b> tab: Host, Port, User, and protocol-specific options.</div></div>
<div class="step"><div class="step-num">4</div><div class="step-text"><b>Authentication</b> tab: password or SSH private key. You can leave blank — PCM will ask at connection time.</div></div>
<div class="step"><div class="step-num">5</div><div class="step-text"><b>Terminal</b> tab: color theme, font, size, <b>startup command</b>, <b>local pre-connection command</b>, output log.</div></div>
<div class="step"><div class="step-num">6</div><div class="step-text"><b>⚙ Advanced</b> tab: keepalive, X11 forwarding, compression, jump host, open mode, external terminal selector.</div></div>
<div class="step"><div class="step-num">7</div><div class="step-text"><b>⚡ Macros</b> tab: define quick commands sendable with one click from the session panel.</div></div>
<div class="step"><div class="step-num">8</div><div class="step-text"><b>📊 Panels</b> tab (SSH, VNC Linux, RDP Windows): enables the right info panel and SFTP side browser. For SSH and VNC Linux: CPU/RAM, processes, disk, network, log streaming. For RDP Windows: PowerShell-based panel via OpenSSH. Each section is individually activatable.</div></div>
<div class="step"><div class="step-num">9</div><div class="step-text"><b>📝 Notes</b> tab: free text field for annotations, procedures, useful links.</div></div>
<div class="step"><div class="step-num">10</div><div class="step-text">Click <b>OK</b> — the session is saved and the connection opens immediately.</div></div>
<h3>Groups</h3>
<p>Sessions are organized in groups (folders). You can:</p>
<ul>
<li>Create nested subgroups</li>
<li>Expand/collapse groups with a click</li>
<li>Move sessions via drag & drop between groups</li>
<li>Sort sessions alphabetically within a group (right-click menu)</li>
</ul>
<h3>Session context menu (right-click)</h3>
<ul>
<li><b>▶ Connect</b> — opens the connection in a new tab</li>
<li><b>✏ Edit</b> — reopens the dialog with pre-filled data</li>
<li><b>📋 Duplicate</b> — creates a copy with "(copy)" suffix</li>
<li><b>📋 Copy command</b> — copies the equivalent shell command to clipboard</li>
<li><b>📄 Export open-connection.sh…</b> — generates a standalone bash script to open the connection</li>
<li><b>📂 Open SFTP/FTP here</b> — opens a file transfer browser for the selected SSH/Telnet/Mosh session</li>
<li><b>View log…</b> — opens a streaming log tab (journalctl/tail -f) for the selected SSH session</li>
<li><b>System monitor…</b> — opens a resource monitoring tab (CPU, RAM, disk, network) for the selected SSH session</li>
<li><b>Ping</b> — checks TCP reachability of the host on the configured port</li>
<li><b>⚡ Macros</b> — submenu with macros defined for this session</li>
<li><b>🗑 Delete</b> — requires confirmation</li>
</ul>
<h3>Import and export sessions</h3>
<p>From <b>File → Export sessions</b> save all sessions to a portable JSON file.
From <b>File → Import sessions</b> load a previously exported JSON file.
Sessions are saved in <code>connections.json</code> in the PCM folder — editable with any text editor.</p>
<!-- ══════════════════════════════════════════════════ PROTOCOLS -->
<h2 id="protocols">🔌 Supported Protocols</h2>
<div class="proto-block ssh">
<p class="proto-title"><span class="badge b-ssh">SSH</span> Secure Shell</p>
<p class="proto-desc">Encrypted remote terminal. The most common protocol for Linux/Unix server management.</p>
<ul>
<li>Authentication: password, SSH key (RSA/Ed25519/ECDSA), SSH agent</li>
<li>Supports proxy jump (<code>ProxyJump</code>), port forwarding, X11 forwarding</li>
<li>Integrated VTE terminal: scrollback, copy/paste, clickable URLs</li>
<li>SFTP browser panel alongside the terminal (enable in session settings)</li>
<li>Pre-command and Wake-on-LAN before connection</li>
</ul>
</div>
<div class="proto-block sftp">
<p class="proto-title"><span class="badge b-sftp">SFTP</span> SSH File Transfer Protocol</p>
<p class="proto-desc">Secure file transfer over an SSH channel. Not FTP — uses an encrypted SSH connection.</p>
<ul>
<li>Same parameters as SSH (host, port, user, key/password)</li>
<li>Integrated graphical browser (WinSCP-style): navigate, upload, download, rename, delete</li>
<li>Permissions, sizes, and modification dates displayed</li>
<li><b>Open mode</b> — internal browser, SFTP CLI terminal, system file manager</li>
</ul>
</div>
<div class="proto-block ftp">
<p class="proto-title"><span class="badge b-ftp">FTP / FTPS</span> File Transfer Protocol</p>
<p class="proto-desc">Classic file transfer protocol. FTPS adds TLS encryption over FTP.</p>
<ul>
<li>Supports plain FTP and FTPS (explicit/implicit)</li>
<li>Integrated graphical browser similar to the SFTP browser</li>
<li>Passive/active mode configurable</li>
<li>Anonymous login support</li>
</ul>
</div>
<div class="proto-block rdp">
<p class="proto-title"><span class="badge b-rdp">RDP</span> Remote Desktop Protocol</p>
<p class="proto-desc">Microsoft remote desktop protocol. Used mainly for Windows machines.</p>
<ul>
<li>Uses <code>xfreerdp</code> (FreeRDP3 recommended)</li>
<li><b>External mode</b>: opens xfreerdp in its own window</li>
<li><b>Internal mode</b>: embeds the RDP session in a PCM tab</li>
<li>Resolution, color depth, multi-monitor, audio redirection configurable</li>
<li>Drive, clipboard, printer sharing</li>
</ul>
</div>
<div class="proto-block vnc">
<p class="proto-title"><span class="badge b-vnc">VNC</span> Virtual Network Computing</p>
<p class="proto-desc">Remote desktop protocol, cross-platform (Linux, macOS, Windows).</p>
<ul>
<li><b>External mode</b>: uses tigervnc, gvncviewer, remmina or any configured client</li>
<li><b>Internal mode</b>: integrated noVNC viewer (WebKit) inside a PCM tab</li>
<li>Quality, color depth, scaling configurable for the integrated viewer</li>
<li>Password save option in internal mode</li>
</ul>
</div>
<div class="proto-block tel">
<p class="proto-title"><span class="badge b-tel">Telnet</span></p>
<p class="proto-desc">Unencrypted text protocol. Use only on trusted networks or for legacy systems.</p>
<ul>
<li>Uses system <code>telnet</code> or <code>netcat</code></li>
<li>Integrated VTE terminal identical to SSH</li>
</ul>
</div>
<div class="proto-block mosh">
<p class="proto-title"><span class="badge b-mosh">Mosh</span> Mobile Shell</p>
<p class="proto-desc">SSH-based protocol resistant to network interruptions. Ideal for mobile or unstable connections.</p>
<ul>
<li>Requires <code>mosh</code> installed on both client and server</li>
<li>Maintains the session when IP changes or the laptop sleeps</li>
<li>SSH key authentication supported</li>
</ul>
</div>
<div class="proto-block ser">
<p class="proto-title"><span class="badge b-ser">Serial</span></p>
<p class="proto-desc">Serial console connection via USB/RS-232 adapter.</p>
<ul>
<li>Uses <code>minicom</code>, <code>picocom</code> or custom command</li>
<li>Port (<code>/dev/ttyUSB0</code>, <code>/dev/ttyACM0</code>…), baud rate, flow control configurable</li>
<li>Integrated VTE terminal</li>
</ul>
</div>
<div class="proto-block" style="border-left-color:#444">
<p class="proto-title">⚡ Exec</p>
<p class="proto-desc">Runs any local command in a PCM tab.</p>
<ul>
<li>Command configurable freely (e.g. <code>htop</code>, <code>journalctl -f</code>, scripts)</li>
<li>Integrated VTE terminal</li>
</ul>
</div>
<!-- ══════════════════════════════════════════════════ AUTHENTICATION -->
<h2 id="authentication">🔑 Authentication</h2>
<h3>Password</h3>
<p>You can save the password in the profile or leave it blank — PCM will ask with a dedicated dialog at each connection.</p>
<div class="warn">⚠️ Passwords saved in <code>connections.json</code> are stored in plaintext. For production or shared machines, prefer SSH keys.</div>
<h3>SSH Private Key (recommended)</h3>
<div class="step"><div class="step-num">1</div><div class="step-text">Go to the <b>Authentication</b> tab in the session dialog. In the "SSH Key Management" section you can see keys already present in <code>~/.ssh/</code>.</div></div>
<div class="step"><div class="step-num">2</div><div class="step-text"><b>Generate new key</b>: choose the type (ed25519 recommended), enter a comment, click <b>⚙ Generate</b>. The key pair is saved in <code>~/.ssh/</code>.</div></div>
<div class="step"><div class="step-num">3</div><div class="step-text"><b>Copy to server</b>: click <b>📤 Copy public key to server</b> — PCM runs <code>ssh-copy-id</code> in a visible terminal where you can type the server password (once only).</div></div>
<div class="step"><div class="step-num">4</div><div class="step-text">Select the key from the "Keys in ~/.ssh:" combo — the "Private key" field fills automatically.</div></div>
<div class="tip">
💡 To avoid typing the passphrase on every connection, use <code>ssh-agent</code>:<br>
<code>eval $(ssh-agent) && ssh-add ~/.ssh/id_ed25519</code>
</div>
<h3>Jump Host (Bastion Host)</h3>
<p>To reach servers not directly accessible (DMZ, private networks):</p>
<ul>
<li><b>Authentication</b> tab → <b>Jump Host (Bastion)</b> section</li>
<li><b>Jump host</b> — address of the intermediate server</li>
<li><b>Jump user</b> — user on the bastion (may differ from the final user)</li>
<li><b>Jump port</b> — SSH port of the bastion (default 22)</li>
</ul>
<p>Equivalent to <code>ssh -J user@bastion:port user@final-host</code>, handled transparently.</p>
<div class="info">ℹ️ Jump Host is available for SSH, SFTP and Mosh.</div>
<h3>SSH Agent Forwarding</h3>
<p>Propagates your local <code>ssh-agent</code> keys through the SSH connection, allowing authentication on subsequent servers without copying private keys.</p>
<p>In the SSH session dialog, <b>⚙ Advanced</b> tab: tick <b>"Agent Forwarding (-A)"</b> — adds the <code>-A</code> flag to the SSH command.</p>
<ul>
<li>Access destination servers through a bastion, without copying keys to the bastion</li>
<li>Clone Git repositories on a remote server using your local keys</li>
</ul>
<div class="warn">⚠️ Enable Agent Forwarding only on servers you trust. A server administrator could use your local agent to authenticate on other servers on your behalf.</div>
<!-- ══════════════════════════════════════════════════ IMPORT -->
<h2 id="import">📥 Import from External Applications</h2>
<h3>Import from SSH config (~/.ssh/config)</h3>
<ol>
<li>In PCM: <span class="menu-path">Tools <span>›</span> Import <span>›</span> SSH Config…</span></li>
<li>PCM reads <code>~/.ssh/config</code> and creates a profile for each <code>Host</code> entry</li>
<li>Group, keys, port, and proxy settings are preserved</li>
</ol>
<h3>Import from Remmina</h3>
<ol>
<li>In PCM: <span class="menu-path">Tools <span>›</span> Import <span>›</span> Remmina…</span></li>
<li>PCM scans <code>~/.local/share/remmina/</code> for <code>.remmina</code> files</li>
<li>Preview imported sessions, confirm to add</li>
</ol>
<p>Imported protocols: SSH, SFTP, RDP, VNC, Telnet. Remmina groups become PCM groups.</p>
<h3>Import from Remote Desktop Manager (XML or JSON)</h3>
<ol>
<li>In RDM: <b>File → Export</b> → choose XML (.rdm) or JSON format</li>
<li>In PCM: <span class="menu-path">Tools <span>›</span> Import <span>›</span> Remote Desktop Manager (XML)…</span> or (JSON)…</li>
<li>Select the file, check the preview, confirm</li>
</ol>
<div class="info">ℹ️ Passwords are not imported — RDM encrypts them with an account-bound key. PCM will ask for credentials on first connection.</div>
<h3>Import from PuTTY</h3>
<p>PCM reads PuTTY saved sessions (Linux/Wine) directly without PuTTY being installed.</p>
<ol>
<li>In PCM: <span class="menu-path">Tools <span>›</span> Import from external application <span>›</span> 🐢 PuTTY…</span></li>
<li>PCM automatically scans <code>~/.putty/sessions/</code></li>
<li>PuTTY sessions are converted to SSH profiles in the <b>"PuTTY"</b> group</li>
</ol>
<h3>Import from MobaXterm</h3>
<ol>
<li>In MobaXterm: <b>Sessions → Export sessions</b> → save <code>.mxtsessions</code> file</li>
<li>In PCM: <span class="menu-path">Tools <span>›</span> Import <span>›</span> MobaXterm…</span></li>
<li>Select the file and confirm</li>
</ol>
<!-- ══════════════════════════════════════════════════ TERMINAL -->
<h2 id="terminal">⌨ Integrated Terminal</h2>
<h3>VTE Terminal</h3>
<p>PCM uses the <b>VTE</b> (Virtual Terminal Emulator) library, the same used by GNOME Terminal. It supports:</p>
<ul>
<li>ANSI/xterm-256color/truecolor colors</li>
<li>Unicode and emoji</li>
<li>Clickable URLs</li>
<li>Configurable scrollback (Settings → Terminal)</li>
<li>Monospace font selectable per session</li>
</ul>
<h3>Copy / Paste</h3>
<ul>
<li><kbd>Ctrl+Shift+C</kbd> — copy selection</li>
<li><kbd>Ctrl+Shift+V</kbd> — paste</li>
<li>Middle-click — paste X11 selection</li>
<li>Right-click → context menu with copy/paste</li>
</ul>
<h3>Available color themes</h3>
<table>
<tr><th>Theme</th><th>Background</th><th>Notes</th></tr>
<tr><td>Dark (Default)</td><td><code>#1e1e1e</code></td><td>General use, reduces eye strain</td></tr>
<tr><td>Light (B/W)</td><td><code>#ffffff</code></td><td>Bright environments, presentations</td></tr>
<tr><td>Dracula</td><td><code>#282a36</code></td><td>Popular theme with vivid colors</td></tr>
<tr><td>Nord</td><td><code>#2e3440</code></td><td>Cool tones, sensitive eyes</td></tr>
<tr><td>Monokai</td><td><code>#272822</code></td><td>Classic from Sublime Text</td></tr>
<tr><td>Solarized Dark / Light</td><td><code>#002b36</code></td><td>High readability, scientifically calibrated</td></tr>
<tr><td>Gruvbox Dark / Light</td><td><code>#282828</code></td><td>Warm tones, popular among developers</td></tr>
<tr><td>One Dark</td><td><code>#282c34</code></td><td>Atom / VS Code theme</td></tr>
<tr><td>Matrix (Green)</td><td><code>#000000</code></td><td>Retro style, maximum contrast</td></tr>
<tr><td>Cobalt</td><td><code>#002240</code></td><td>Deep blue tones</td></tr>
<tr><td>Zenburn</td><td><code>#3f3f3f</code></td><td>Muted colors, great for long sessions</td></tr>
</table>
<h3>Search in terminal output</h3>
<ul>
<li><kbd>Ctrl</kbd>+<kbd>F</kbd> in the active terminal — opens the search bar</li>
<li>Search forward and backward with <kbd>↑</kbd> / <kbd>↓</kbd> or the ← → buttons</li>
<li>Matches are highlighted in the text</li>
<li>Close the bar with <kbd>Esc</kbd></li>
</ul>
<h3>Session logging</h3>
<p>In the session dialog, <b>Terminal</b> tab → <b>Log output</b>:</p>
<ul>
<li>Enable logging and specify the output directory</li>
<li>Files are named <code>session_YYYYMMDD_HHMMSS.log</code></li>
<li>Logs capture everything shown in the terminal</li>
</ul>
<h3>Automatic password input</h3>
<p>PCM automatically inputs the password when the SSH/Telnet prompt appears in the terminal (feed_child mechanism). For SSH ≥ 8.4 it also uses <code>SSH_ASKPASS_REQUIRE=force</code> for silent authentication.</p>
<h3>Command export</h3>
<p>Right-click on a tab → <b>Export commands.sh…</b> to save the command history of the session to a shell script file.</p>
<!-- ══════════════════════════════════════════════════ SFTP/FTP -->
<h2 id="sftp">📁 SFTP/FTP File Manager</h2>
<h3>SFTP sidebar panel</h3>
<p>Enable in the session dialog → <b>Panels</b> tab → <b>SFTP side panel</b>. This adds a compact file browser panel alongside the SSH terminal tab without opening a separate tab.</p>
<ul>
<li>Upload and download with <b>real-time progress bar</b> (bytes transferred / total)</li>
<li>Create folders, rename, delete</li>
<li>Permissions, sizes and modification dates</li>
</ul>
<h3>Dual-pane SFTP browser (dedicated tab)</h3>
<p>Opens as its own tab when using the SFTP protocol or via right-click → <b>Open file transfer here</b> on an SSH tab.</p>
<ul>
<li>Side-by-side local and remote panels (WinSCP style)</li>
<li>Transfer queue with progress, speed (bytes/s) and ETA per file</li>
<li>Pause and cancel in-progress transfers</li>
<li>Recursive upload/download of entire directory trees</li>
<li><b>Directory synchronization</b> — <b>Synchronize</b> button in the toolbar (see below)</li>
</ul>
<h3>Directory synchronization local ↔ remote</h3>
<p>Available in the dual-pane SFTP browser via the <b>Synchronize</b> button.</p>
<div class="step"><div class="step-num">1</div><div class="step-text">Navigate to the desired folder in both the local and remote panels.</div></div>
<div class="step"><div class="step-num">2</div><div class="step-text">Click <b>Synchronize</b> — PCM scans both folders comparing size and modification time.</div></div>
<div class="step"><div class="step-num">3</div><div class="step-text">The diff table opens: <i>Local only</i>, <i>Remote only</i>, <i>Modified</i>, <i>Equal</i>. The suggested direction (→ remote / ← local) is computed from the more recent modification date.</div></div>
<div class="step"><div class="step-num">4</div><div class="step-text">Filter by status, select/deselect files, adjust direction as needed, then click <b>Sync selected</b>.</div></div>
<div class="step"><div class="step-num">5</div><div class="step-text">Transfers are queued and executed with the existing transfer queue (progress, speed, ETA visible).</div></div>
<h3>FTP/FTPS integrated browser</h3>
<p>Same behavior as the dual-pane SFTP browser, but uses FTP or FTPS:</p>
<ul>
<li>Plain FTP (port 21) or FTPS with explicit TLS</li>
<li>Passive mode (PASV) for NAT/firewall</li>
</ul>
<!-- ══════════════════════════════════════════════════ TUNNEL -->
<h2 id="tunnel">🔀 SSH Tunnels</h2>
<h3>Create a tunnel</h3>
<ol>
<li>Click <b>New Tunnel</b> in the toolbar or <span class="menu-path">Tools <span>›</span> New SSH Tunnel…</span></li>
<li>Fill in:
<ul>
<li><b>SSH Server</b>: host, port, user, key/password</li>
<li><b>Tunnel type</b>: Local, Remote, Dynamic (SOCKS)</li>
<li><b>Local port</b>: local port to listen on</li>
<li><b>Remote host/port</b>: destination for local/remote tunnels</li>
</ul>
</li>
<li>Click <b>Start</b> — the tunnel runs in background</li>
</ol>
<h3>Tunnel types</h3>
<table>
<tr><th>Type</th><th>Usage</th><th>SSH option</th></tr>
<tr><td><b>Local</b></td><td>Access a remote service locally (<code>localhost:localport → remotehost:remoteport</code>)</td><td><code>-L</code></td></tr>
<tr><td><b>Remote</b></td><td>Expose a local service to the remote server</td><td><code>-R</code></td></tr>
<tr><td><b>Dynamic (SOCKS)</b></td><td>SOCKS5 proxy through the SSH server</td><td><code>-D</code></td></tr>
</table>
<h3>Manage tunnels</h3>
<p>The <b>Tunnel Indicator</b> in the toolbar shows the number of active tunnels at a glance. Click it to open the quick-access popup:</p>
<ul>
<li>Lists each active tunnel with server, type, and ports</li>
<li>Individual <b>Stop</b> button per tunnel — no need to open the full manager</li>
<li>Indicator refreshes automatically every 3 seconds</li>
<li>Tunnel state persists even if the Tunnel Manager dialog is closed and reopened</li>
</ul>
<p>For full management (add, edit, start, stop all tunnels) click <b>Open Tunnel Manager</b> in the popup or use <span class="menu-path">Tools <span>›</span> SSH Tunnels…</span>.</p>
<!-- ══════════════════════════════════════════════════ ADVANCED -->
<h2 id="advanced">⚙ Advanced Features</h2>
<h3>Pre-command</h3>
<p>In the session dialog, <b>Advanced</b> tab → <b>Pre-command</b>: a command run locally <i>before</i> the connection. Useful for:</p>
<ul>
<li>Starting a VPN (<code>nmcli con up vpn-office</code>)</li>
<li>Mounting a network share</li>
<li>Any preparation script</li>
</ul>
<p>You can set a timeout after which PCM proceeds with connection even if the command has not terminated.</p>
<h3>Port forwarding in session</h3>
<p>In the session dialog, <b>Advanced</b> tab → <b>Port Forwarding</b>: define one or more <code>-L</code>/<code>-R</code> rules active for the duration of the session.</p>
<h3>External clients</h3>
<p>For each protocol you can choose the terminal emulator or external client used to open the connection:</p>
<ul>
<li><b>Internal terminal</b> (default): VTE embedded in PCM</li>
<li><b>External terminal</b>: xterm, GNOME Terminal, Konsole, Alacritty, Kitty, etc.</li>
</ul>
<p>The external terminal list is populated automatically based on the emulators installed on the system.</p>
<h3>Sessions with unavailable client</h3>
<p>If a saved profile uses a client that is no longer installed, the combo shows the entry with the <code>⚠ not found</code> suffix. Update the profile choosing an available client before connecting.</p>
<div class="tip">💡 Use <b>Tools → Check dependencies</b> to see the full list of all clients and terminals detected on the system. The check also runs automatically at startup.</div>
<h3>Credential encryption</h3>
<p>PCM can protect users and passwords saved in <code>connections.json</code> with <b>AES-256</b> encryption (Fernet). The key is derived from the master password using PBKDF2-HMAC-SHA256 (480,000 iterations) and is never written to disk.</p>
<p>At the very first launch, if <code>connections.json</code> does not yet exist, PCM asks whether to enable credential protection. On subsequent launches with encryption active, PCM shows an unlock dialog before opening the main window (3 attempts maximum).</p>
<p>From <b>Tools → Set global password…</b> you can:</p>
<ul>
<li><b>Enable encryption</b> — if not already active; all profiles are immediately encrypted</li>
<li><b>Change the password</b> — enter the old one and the new one; all profiles are re-encrypted</li>
<li><b>Disable encryption</b> — enter the current password; credentials return to plaintext in JSON</li>
</ul>
<p>The <code>user</code> and <code>password</code> fields of each profile in <code>connections.json</code> are encrypted with the <code>ENC:</code> prefix followed by a Fernet base64 token. All other fields remain in plaintext.</p>
<div class="warn">⚠️ If you forget the master password, credentials cannot be recovered. Keep a secure copy. To reset: delete <code>connections.json</code> and the <code>crypto</code> section from <code>pcm_settings.json</code>.</div>
<h3>Wake-on-LAN</h3>
<p>PCM can wake a powered-off machine before connecting by sending a <b>UDP magic packet</b> to the configured MAC address. Available for SSH, Mosh, RDP, VNC and Telnet.</p>
<p>In the session edit dialog, <b>Connection</b> tab, <b>Wake-on-LAN</b> section:</p>
<ul>
<li><b>Enable WoL</b> — tick to enable automatic magic packet sending before each connection</li>
<li><b>MAC address</b> — physical MAC address of the remote machine's network card (format <code>AA:BB:CC:DD:EE:FF</code>)</li>
<li><b>Wait time</b> — maximum seconds to wait before PCM attempts the connection (default 20 s)</li>
</ul>
<p>On session open, PCM builds the magic packet and sends it as UDP broadcast on port 9. A progress window with repeated pings appears; as soon as the host responds the connection starts automatically.</p>
<div class="warn">⚠️ Wake-on-LAN only works on the <b>local network</b> or via directed broadcast. Make sure the remote machine's network card and BIOS/UEFI have WoL enabled.</div>
<h3>Session macros</h3>
<p>Quick commands linked to a specific session, sendable to the terminal with a single click from the session panel.</p>
<p>In the session create/edit dialog, <b>⚡ Macros</b> tab: add Name/Command pairs. Use the <b>➕</b>, <b>✏</b>, <b>🗑</b>, <b>▲/▼</b> buttons to manage order.</p>
<p>To use a macro: right-click on the session in the panel → <b>⚡ Macros</b> → select the command. The command is sent instantly to the active session terminal via clipboard (no typing delay).</p>
<div class="grid2">
<div class="card">
<h4>Useful macro examples</h4>
<ul>
<li><code>df -h</code> — disk space</li>
<li><code>tail -f /var/log/syslog</code> — live system log</li>
<li><code>sudo systemctl restart nginx</code> — restart service</li>
<li><code>uptime && free -h</code> — system status</li>
<li><code>docker ps</code> — active containers</li>
</ul>
</div>
<div class="card">
<h4>Difference with startup command</h4>
<p>The <b>startup command</b> (Terminal tab) runs <i>automatically</i> on connection. <b>Macros</b> run <i>manually</i> on demand, at any time during the session.</p>
</div>
</div>
<h3>Local pre-connection command</h3>
<p>Run a shell command on <b>your PC</b> before PCM opens the remote connection. Ideal for activating VPN, mounting volumes, or any preparatory local operation.</p>
<p>In the session edit dialog, <b>Terminal</b> tab:</p>
<ul>
<li><b>Local pre-connection cmd</b> — bash command to run before connecting</li>
<li><b>Pre-cmd timeout</b> — maximum wait seconds (0 = no timeout, default 15 s)</li>
</ul>
<p>The command is wrapped with the connection command in a single bash process. If the pre-command exits with a non-zero code (error), the connection does not start.</p>
<pre>
bash -c '<span class="kw">pre-cmd</span> && <span class="str">echo "Pre-connection OK. Connecting..."</span> && <span class="kw">ssh user@host</span>'
</pre>
<div class="grid2">
<div class="card">
<h4>Practical examples</h4>
<ul>
<li><code>wg-quick up vpn0</code> — activate WireGuard VPN</li>
<li><code>openfortivpn --config=/etc/vpn.conf</code> — activate FortiVPN</li>
<li><code>sudo openvpn --config ~/vpn.ovpn &</code> — start OpenVPN</li>
<li><code>sshuttle -r gateway 10.0.0.0/8 &</code> — network tunnel</li>
</ul>
</div>
<div class="card">
<h4>Timeout note</h4>
<p>Set the timeout to a reasonable value for your pre-command. A VPN that takes 10 s to activate needs a timeout of at least 15–20 s. With 0 the pre-command can run indefinitely (useful for background commands).</p>
</div>
</div>
<h3>Export open-connection.sh</h3>
<p>Generates a standalone bash script that opens the connection without PCM being open. Useful for sharing or terminal use.</p>
<p>Right-click on the session in the panel → <b>📄 Export open-connection.sh…</b>. A dialog opens with a script preview (editable), a <b>💾 Save</b> button (with automatic <code>chmod 755</code>) and <b>📋 Copy to clipboard</b>.</p>
<p>The script includes, if configured: local pre-cmd block, Wake-on-LAN block, and the connection command.</p>
<h3>Export commands.sh</h3>
<p>Generates a <b>replay script</b> with all commands executed during the session. The replay connects via SSH and re-executes the commands in sequence.</p>
<p>Right-click on the <b>active session tab</b> (not the session panel) → <b>📄 Export commands.sh…</b>.</p>
<div class="warn">⚠️ This function is accessible from the <b>terminal tab</b>, not from the session panel. The session panel has "Export open-connection.sh" (connection script), the tab has "Export commands.sh" (command replay).</div>
<p>PCM distinguishes two scenarios:</p>
<div class="grid2">
<div class="card">
<h4>🔴 Log not enabled</h4>
<p>A warning appears with instructions to enable the log. You can still export commands sent via <b>macros and multi-exec</b> using the "Export PCM commands only" button.</p>
</div>
<div class="card">
<h4>🟢 Log enabled</h4>
<p>PCM parses the log file, extracts typed commands recognizing lines following a bash/zsh prompt, and combines them with internally tracked commands.</p>
</div>
</div>
<p>The export dialog shows a table with all commands (editable with double-click, reorderable with ▲/▼, deletable). The script preview updates in real time. For SSH sessions the script uses a <b>heredoc</b> to run all commands in a single connection.</p>
<h3>Global variables</h3>
<p>From <b>Tools → Global variables</b> (<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>G</kbd>). Define <code>NAME = value</code> pairs and use them with the syntax <code>{NAME}</code> in session commands:</p>
<pre>
<span class="cm"># Global variable:</span>
DEPLOY_PATH = /var/www/html/app
<span class="cm"># Session "Startup command" field:</span>
cd {DEPLOY_PATH} && git pull && npm run build
</pre>
<h3>Protected mode</h3>
<p>From <b>Tools → Protected mode</b> (<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>).
When active, passwords visible in the interface are replaced with <code>****</code>.
Useful during screen sharing or presentations. Does not modify saved data.</p>
<h3>Audit log</h3>
<p>PCM automatically records every opened connection in a centralized log (<code>audit_log.json</code>) with timestamp, duration, protocol and status.</p>
<p>From <b>Tools → Audit log</b>: a viewer opens with a connection table (Timestamp, Session, Host, Protocol, Duration, Status). Available actions:</p>
<ul>
<li><b>🗑 Clear log</b> — empties the <code>audit_log.json</code> file</li>
<li><b>📥 Export CSV</b> — saves a copy of the log in CSV format (compatible with Excel, LibreOffice Calc)</li>
</ul>
<div class="info">ℹ️ The audit log does not contain passwords or credentials — only connection metadata. It is complementary to the terminal output log: the latter records the session content, this one records metadata.</div>
<h3>KeePassXC integration</h3>
<p>PCM can look up credentials directly in the open KeePassXC database, via the <b>KeePassXC Browser</b> v2 protocol (local Unix socket — no browser extension needed).</p>
<p>Prerequisites: KeePassXC running with unlocked database + Browser Integration enabled (KeePassXC → Tools → Settings → Browser Integration).</p>
<div class="step"><div class="step-num">1</div><div class="step-text">In the session dialog, <b>Connection</b> tab, click the <b>🔑 KeePassXC</b> button</div></div>
<div class="step"><div class="step-num">2</div><div class="step-text">The search dialog opens: type the server hostname or any keyword</div></div>
<div class="step"><div class="step-num">3</div><div class="step-text">Click <b>Search</b> — PCM queries KeePassXC and shows found entries (title, user, URL)</div></div>
<div class="step"><div class="step-num">4</div><div class="step-text">Select the desired entry and click <b>Use</b> — user and password are filled in automatically</div></div>
<p>From <b>Tools → KeePassXC</b> you can check the connection status and the detected socket path.</p>
<h3>Broadcast terminals</h3>
<p>Send the same text (or command) to <b>multiple terminals simultaneously</b> — ideal for running operations on a cluster of servers in parallel.</p>
<p>From <b>Tools → Broadcast terminals</b>: the dialog lists all open terminals with a checkbox for each. Write the text in the text area, choose whether to automatically add <kbd>Enter</kbd> (default: yes), then click <b>⚡ Send</b>.</p>
<div class="tip">💡 Broadcast only works on VTE embedded terminals (SSH/Telnet/Mosh/Exec tabs open in PCM). RDP and VNC sessions in external windows are not reachable because they don't use the internal terminal.</div>
<div class="grid2">
<div class="card">
<h4>Difference with Multi-exec</h4>
<p><b>Multi-exec</b> (<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>M</kbd>) uses the clipboard and sends with automatic Enter. <b>Broadcast</b> is more flexible: you can send partial text (without Enter), multiple lines, and see the terminal selection explicitly.</p>
</div>
<div class="card">
<h4>Typical use cases</h4>
<ul>
<li><code>apt update && apt upgrade -y</code> — update all servers</li>
<li><code>sudo systemctl restart nginx</code> — restart on entire cluster</li>
<li><code>df -h</code> — check space on all servers</li>
</ul>
</div>
</div>
<h3>Reachability check</h3>
<p>Right-click on any session in the panel → <b>🌐 Check reachability…</b></p>
<p>A dialog opens that automatically runs three tests in sequence:</p>
<table>
<tr><th>Test</th><th>What it checks</th><th>Result</th></tr>
<tr><td><b>1. DNS</b></td><td>Resolves the hostname to an IP address</td><td>✅ IP resolved or ❌ name not found</td></tr>
<tr><td><b>2. Ping</b></td><td>Sends 3 ICMP packets, shows RTT and loss</td><td>✅ Ping OK or ⚠ ICMP blocked</td></tr>
<tr><td><b>3. TCP port</b></td><td>Opens a TCP connection on the protocol port</td><td>✅ Port open or ❌ timeout</td></tr>
</table>
<div class="info">ℹ️ A blocked ping (ICMP filtered by firewall) does not mean the service is unreachable — the TCP port test is the definitive one.</div>
<h3>RDP clients and detected terminals</h3>
<p>The <b>RDP Client</b>, <b>VNC Client</b> and <b>External terminal</b> combos in the session dialog show <b>only programs present in PATH</b> at the time the dialog opens.</p>
<table>
<tr><th>Client</th><th>Internal panel</th><th>Authentication</th><th>Notes</th></tr>
<tr><td><code>rdesktop</code></td><td>✅ Native (<code>-X</code>)</td><td>Native NTLM, no Kerberos</td><td><b>Recommended</b> for internal panel — fast connection</td></tr>
<tr><td><code>xfreerdp3</code></td><td>✅ xdotool reparent</td><td>NTLM or Kerberos (selectable)</td><td>FreeRDP 3.x — internal panel slower (polling)</td></tr>
<tr><td><code>xfreerdp</code></td><td>❌ v2 not supported</td><td>—</td><td>Internal panel option automatically disabled</td></tr>
</table>
<p>PCM automatically detects terminals: <code>xterm</code>, <code>xfce4-terminal</code>, <code>gnome-terminal</code>, <code>konsole</code>, <code>alacritty</code>, <code>kitty</code>, <code>terminator</code>, <code>wezterm</code>, <code>foot</code>, <code>tilix</code>, <code>lxterminal</code>, <code>mate-terminal</code>, <code>st</code>.</p>