ssh-x-term 1.0.2 → 1.0.4

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.
Files changed (2) hide show
  1. package/README.md +127 -49
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -14,19 +14,30 @@
14
14
  </p>
15
15
 
16
16
  SSH-X-Term is a powerful terminal-based SSH client with a TUI (Text User Interface) built on [Bubble Tea](https://github.com/charmbracelet/bubbletea).
17
- It lets you manage SSH connections, securely store credentials using Bitwarden, and connect to remote servers with both password and key-based authentication.
17
+ It lets you manage SSH connections and securely store credentials using either **local system keyring** (via [go-keyring](https://github.com/zalando/go-keyring)) or **Bitwarden vault**, and connect to remote servers with both password and key-based authentication.
18
18
  Cross-platform features include support for passh (Unix), plink.exe (Windows), and full tmux integration.
19
19
 
20
20
  ![Screenshot](https://github.com/user-attachments/assets/a545d09b-2101-4c6d-b5b9-377b2d554d57)
21
21
 
22
22
  ## Features
23
23
 
24
- - Manage SSH connections in an interactive Bubble Tea TUI.
25
- - Secure credential storage and retrieval via Bitwarden CLI.
26
- - Password-based SSH login automation using passh (Unix) or plink.exe (Windows).
27
- - Key-based SSH authentication.
28
- - Open connections in new tmux windows or current terminal.
29
- - Fullscreen and responsive TUI.
24
+ - **Integrated SSH Terminal**: Fully functional terminal emulator within Bubble Tea
25
+ - VT100/ANSI escape sequence support for proper terminal rendering
26
+ - Scrollback buffer (10,000 lines) with keyboard and mouse scrolling
27
+ - Text selection with mouse (click and drag)
28
+ - Copy to clipboard support (Ctrl+C or automatic on selection)
29
+ - Full keyboard support (arrow keys, home, end, function keys, etc.)
30
+ - Window resize handling
31
+ - Works entirely within the TUI (no external terminal takeover)
32
+ - Manage SSH connections in an interactive Bubble Tea TUI
33
+ - **Dual credential storage modes:**
34
+ - **Local storage** with go-keyring (system keyring integration)
35
+ - **Bitwarden vault** storage via Bitwarden CLI
36
+ - Secure credential storage: passwords never stored in plaintext
37
+ - Password-based SSH login automation using passh (Unix) or plink.exe (Windows)
38
+ - Key-based SSH authentication
39
+ - Open connections in new tmux windows or integrated terminal
40
+ - Fullscreen and responsive TUI
30
41
 
31
42
  ## Project Structure
32
43
 
@@ -34,41 +45,56 @@ Cross-platform features include support for passh (Unix), plink.exe (Windows), a
34
45
  ssh-x-term/
35
46
  ├── cmd/
36
47
  │ └── sxt/
37
- │ └── main.go # Application entry point
48
+ │ └── main.go # Application entry point
38
49
  ├── internal/
39
50
  │ ├── config/
40
- │ │ ├── config.go # Configuration handling
41
- │ │ └── models.go # Configuration data models
51
+ │ │ ├── bitwarden.go # Bitwarden vault integration and management
52
+ │ │ ├── config.go # Local configuration handling with go-keyring
53
+ │ │ ├── models.go # Configuration data models
54
+ │ │ ├── pathutil.go # Path utilities (home directory expansion)
55
+ │ │ └── storage.go # Storage interface definition
42
56
  │ ├── ssh/
43
- │ │ ├── client.go # SSH client implementation
44
- │ │ ├── session_unix.go # SSH session management (Unix)
45
- │ │ └── session_windows.go # SSH session management (Windows)
57
+ │ │ ├── client.go # SSH client implementation
58
+ │ │ ├── session_unix.go # SSH session management (Unix)
59
+ │ │ └── session_windows.go # SSH session management (Windows)
46
60
  │ └── ui/
47
61
  │ ├── components/
48
- │ │ ├── bitwarden_config.go # Bitwarden CLI configuration form/component
49
- │ │ ├── bitwarden_login_form.go # Bitwarden login form component
50
- │ │ ├── bitwarden_unlock_form.go # Bitwarden unlock form component
51
- │ │ ├── connection_list.go # List of SSH connections
52
- │ │ ├── form.go # Form for adding/editing connections
53
- │ │ ├── storage_select.go # Credential storage selection (Bitwarden/etc.)
54
- │ │ └── terminal.go # Terminal component for SSH sessions
55
- │ ├── model.go # Main UI model
56
- ├── update.go # Update logic for UI
57
- └── view.go # View rendering logic
62
+ │ │ ├── bitwarden_collection_list.go # Bitwarden collection selector
63
+ │ │ ├── bitwarden_config.go # Bitwarden CLI configuration form
64
+ │ │ ├── bitwarden_login_form.go # Bitwarden login form component
65
+ │ │ ├── bitwarden_organization_list.go # Bitwarden organization selector
66
+ │ │ ├── bitwarden_unlock_form.go # Bitwarden unlock form component
67
+ │ │ ├── connection_list.go # List of SSH connections
68
+ │ │ ├── form.go # Form for adding/editing connections
69
+ ├── storage_select.go # Credential storage selection (Local/Bitwarden)
70
+ │ └── terminal.go # Terminal component for SSH sessions
71
+ ├── connection_handler.go # Connection lifecycle management
72
+ │ ├── model.go # Main UI model and state
73
+ │ ├── update.go # Update logic for UI events
74
+ │ └── view.go # View rendering logic
58
75
  ├── pkg/
59
76
  │ └── sshutil/
60
- │ ├── auth.go # Authentication utilities (passh/plink, etc.)
61
- │ ├── terminal_unix.go # Terminal utilities (Unix)
62
- │ └── terminal_windows.go # Terminal utilities (Windows)
63
- ├── go.mod
64
- ├── go.sum
65
- └── README.md
77
+ │ ├── auth.go # Authentication utilities (passh/plink, etc.)
78
+ │ ├── terminal_unix.go # Terminal utilities (Unix)
79
+ │ └── terminal_windows.go # Terminal utilities (Windows)
80
+ ├── go.mod # Go module dependencies
81
+ ├── go.sum # Go module checksums
82
+ ├── package.json # npm package configuration
83
+ ├── index.js # npm entry point
84
+ ├── install.js # npm post-install script
85
+ ├── LICENSE # MIT License
86
+ ├── CONTRIBUTING.md # Contribution guidelines
87
+ ├── FLOW.md # Application flow documentation
88
+ └── README.md # This file
66
89
  ```
67
90
 
68
91
  **Note:**
69
- - Bitwarden integration is handled via several UI components:
70
- - `bitwarden_config.go`, `bitwarden_login_form.go`, `bitwarden_unlock_form.go` for configuration, login, and unlock flows.
71
- - `storage_select.go` lets users choose Bitwarden or other credential storage.
92
+ - **Local Storage Mode**: Uses `go-keyring` to securely store passwords in the system keyring (see `config.go`)
93
+ - **Bitwarden Integration**: Managed through several components:
94
+ - `bitwarden.go` handles vault operations via Bitwarden CLI
95
+ - `bitwarden_config.go`, `bitwarden_login_form.go`, `bitwarden_unlock_form.go` for authentication flows
96
+ - `bitwarden_organization_list.go`, `bitwarden_collection_list.go` for organizational vault management
97
+ - `storage_select.go` lets users choose between Local (with go-keyring) or Bitwarden storage
72
98
 
73
99
  **Flow chart**
74
100
  - [FLOW](https://github.com/eugeniofciuvasile/ssh-x-term/blob/main/FLOW.md)
@@ -76,7 +102,11 @@ ssh-x-term/
76
102
  ## Prerequisites
77
103
 
78
104
  - **Go 1.24+**
79
- - **Bitwarden CLI (`bw`)** — for credential management ([install guide](https://bitwarden.com/help/cli/))
105
+ - **System keyring support** — for secure local password storage via go-keyring:
106
+ - **macOS**: Keychain (built-in)
107
+ - **Linux**: Secret Service API (`gnome-keyring`, `kwallet`, or compatible)
108
+ - **Windows**: Credential Manager (built-in)
109
+ - **Bitwarden CLI (`bw`)** — optional, for Bitwarden vault credential management ([install guide](https://bitwarden.com/help/cli/))
80
110
  - **passh** — for password authentication on Unix ([compile it from here](https://github.com/clarkwang/passh))
81
111
  - **tmux** — recommended for multi-window SSH sessions ([install guide](https://github.com/tmux/tmux/wiki/Installing))
82
112
  - **plink.exe** — for password authentication on Windows ([download from PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html))
@@ -90,17 +120,20 @@ ssh-x-term requires the following system tools to be installed:
90
120
 
91
121
  - `tmux`
92
122
  - `passh`
93
- - `bitwarden-cli` (npm package: `@bitwarden/cli`, install globally: `npm install -g @bitwarden/cli`)
123
+ - System keyring support (for secure local password storage)
124
+ - `bitwarden-cli` (optional, npm package: `@bitwarden/cli`, install globally: `npm install -g @bitwarden/cli`)
94
125
 
95
126
  ### Linux (Debian/Ubuntu):
96
127
 
97
128
  ```sh
98
129
  sudo apt update
99
- sudo apt install -y tmux
130
+ sudo apt install -y tmux gnome-keyring
100
131
  npm install -g @bitwarden/cli
101
132
  # follow github repo https://github.com/clarkwang/passh to compile passh
102
133
  ```
103
134
 
135
+ **Note**: For Linux, ensure you have a keyring daemon running (e.g., `gnome-keyring-daemon` or `kwallet`) for go-keyring to work.
136
+
104
137
  ### macOS (with Homebrew):
105
138
 
106
139
  ```sh
@@ -109,10 +142,13 @@ npm install -g @bitwarden/cli
109
142
  # follow github repo https://github.com/clarkwang/passh to compile passh
110
143
  ```
111
144
 
145
+ **Note**: macOS uses Keychain by default, which is already available.
146
+
112
147
  ### Windows:
113
148
 
114
149
  - Install `tmux` and `passh` via WSL/Cygwin or use alternatives.
115
150
  - Install Bitwarden CLI with: `npm install -g @bitwarden/cli`
151
+ - Windows Credential Manager is used by go-keyring and is built-in.
116
152
 
117
153
  ## Installation
118
154
 
@@ -183,30 +219,71 @@ mv sxt /usr/local/bin/ # or any location in your PATH
183
219
  sxt
184
220
  ```
185
221
 
186
- 2. **Manage SSH connections:**
222
+ 2. **First run:** Choose your credential storage mode:
223
+ - **Local Storage**: Uses system keyring (Keychain/Secret Service/Credential Manager)
224
+ - **Bitwarden**: Uses Bitwarden vault (requires `bw` CLI and authentication)
225
+
226
+ 3. **Manage SSH connections:**
187
227
  - Press `a` to add, `e` to edit, `d` to delete a connection.
188
228
  - Press `o` to toggle opening connections in a new tmux window.
189
229
  - Press `Enter` to connect.
190
230
  - Use arrow keys to navigate.
191
- - All credentials are stored/retrieved using Bitwarden.
231
+ - Credentials are stored securely based on your chosen storage mode.
192
232
 
193
- 3. **Connection Form:**
233
+ 4. **Connection Form:**
194
234
  - Fill in fields as prompted.
195
235
  - `Tab` to navigate, `Ctrl+p` to toggle auth type, `Enter` to submit, `Esc` to cancel.
196
236
 
197
- 4. **SSH Session:**
198
- - `Esc` to disconnect.
199
- - Passwords are supplied securely via passh or plink.exe (never echoed or stored in plaintext).
237
+ 5. **SSH Session:**
238
+ - Fully integrated terminal within Bubble Tea UI
239
+ - **Navigation:**
240
+ - `Esc` to disconnect and return to connection list
241
+ - `Ctrl+D` to send EOF (End of File) signal
242
+ - **Scrolling:**
243
+ - `PgUp` / `PgDn` to scroll up/down by 10 lines
244
+ - `Shift+Up` / `Shift+Down` for scrolling
245
+ - `Ctrl+Home` to scroll to top
246
+ - `Ctrl+End` to scroll to bottom
247
+ - Mouse wheel for scrolling
248
+ - **Text Selection & Copy:**
249
+ - Click and drag with mouse to select text
250
+ - `Ctrl+C` to copy selected text (or send interrupt if no selection)
251
+ - `Ctrl+Shift+C` to force copy selection
252
+ - Selected text is automatically copied to clipboard on mouse release
253
+ - **Terminal Features:**
254
+ - VT100/ANSI escape sequence support
255
+ - 10,000 line scrollback buffer
256
+ - Window resize support
257
+ - Full keyboard support (arrow keys, home, end, etc.)
258
+ - Passwords are supplied securely (never echoed or stored in plaintext).
200
259
 
201
260
  ## Configuration
202
261
 
203
- Config is stored at: `~/.config/ssh-x-term/ssh-x-term.json`
204
- Connection secrets are stored in your Bitwarden vault.
262
+ SSH-X-Term supports two credential storage modes:
263
+
264
+ ### Local Storage (Default)
265
+ - Config is stored at: `~/.config/ssh-x-term/ssh-x-term.json`
266
+ - **Passwords are stored securely in your system keyring** via `go-keyring`:
267
+ - **macOS**: Stored in Keychain
268
+ - **Linux**: Stored via Secret Service API (gnome-keyring/kwallet)
269
+ - **Windows**: Stored in Credential Manager
270
+ - Connection metadata (host, port, username, etc.) is saved in the JSON file
271
+ - Passwords are **never** stored in plaintext in the JSON file
272
+
273
+ ### Bitwarden Vault Storage
274
+ - Connection secrets are stored in your Bitwarden vault
275
+ - Requires Bitwarden CLI (`bw`) to be installed and configured
276
+ - Supports both personal vaults and organization collections
205
277
 
206
278
  ## Security Notes
207
279
 
208
- - **Passwords are only handled via secure subprocesses (`passh`, `plink.exe`) and Bitwarden.**
209
- - **No plaintext passwords are ever written to disk or logs.**
280
+ - **Local Storage Mode**: Passwords are stored securely using **go-keyring**, which integrates with your system's native credential storage:
281
+ - macOS: Keychain
282
+ - Linux: Secret Service API (gnome-keyring, kwallet, etc.)
283
+ - Windows: Credential Manager
284
+ - **Bitwarden Mode**: Credentials are managed via Bitwarden CLI and stored in your encrypted vault
285
+ - **SSH Authentication**: Passwords are supplied securely via subprocesses (`passh`, `plink.exe`) and never echoed or logged
286
+ - **No plaintext passwords**: Passwords are **never** written to disk in plaintext (not in config files or logs)
210
287
 
211
288
  ## License
212
289
 
@@ -226,7 +303,8 @@ For details, see the [MIT License](LICENSE).
226
303
 
227
304
  ## Credits
228
305
 
229
- - [Bubble Tea](https://github.com/charmbracelet/bubbletea)
230
- - [Bitwarden CLI](https://bitwarden.com/help/cli/)
231
- - [passh](https://github.com/clarkwang/passh)
232
- - [PuTTY/plink.exe](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)
306
+ - [Bubble Tea](https://github.com/charmbracelet/bubbletea) — Terminal UI framework
307
+ - [go-keyring](https://github.com/zalando/go-keyring) — Secure system keyring integration
308
+ - [Bitwarden CLI](https://bitwarden.com/help/cli/) — Bitwarden vault management
309
+ - [passh](https://github.com/clarkwang/passh) — Password-based SSH automation (Unix)
310
+ - [PuTTY/plink.exe](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) — Password-based SSH automation (Windows)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ssh-x-term",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "TUI to handle multiple SSH connections simultaneously",
5
5
  "main": "index.js",
6
6
  "bin": {