ssh-x-term 1.0.2 → 1.0.3
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.
- package/README.md +93 -42
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
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
|
|
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
|

|
|
@@ -22,7 +22,10 @@ Cross-platform features include support for passh (Unix), plink.exe (Windows), a
|
|
|
22
22
|
## Features
|
|
23
23
|
|
|
24
24
|
- Manage SSH connections in an interactive Bubble Tea TUI.
|
|
25
|
-
-
|
|
25
|
+
- **Dual credential storage modes:**
|
|
26
|
+
- **Local storage** with go-keyring (system keyring integration)
|
|
27
|
+
- **Bitwarden vault** storage via Bitwarden CLI
|
|
28
|
+
- Secure credential storage: passwords never stored in plaintext.
|
|
26
29
|
- Password-based SSH login automation using passh (Unix) or plink.exe (Windows).
|
|
27
30
|
- Key-based SSH authentication.
|
|
28
31
|
- Open connections in new tmux windows or current terminal.
|
|
@@ -34,41 +37,56 @@ Cross-platform features include support for passh (Unix), plink.exe (Windows), a
|
|
|
34
37
|
ssh-x-term/
|
|
35
38
|
├── cmd/
|
|
36
39
|
│ └── sxt/
|
|
37
|
-
│ └── main.go
|
|
40
|
+
│ └── main.go # Application entry point
|
|
38
41
|
├── internal/
|
|
39
42
|
│ ├── config/
|
|
40
|
-
│ │ ├──
|
|
41
|
-
│ │
|
|
43
|
+
│ │ ├── bitwarden.go # Bitwarden vault integration and management
|
|
44
|
+
│ │ ├── config.go # Local configuration handling with go-keyring
|
|
45
|
+
│ │ ├── models.go # Configuration data models
|
|
46
|
+
│ │ ├── pathutil.go # Path utilities (home directory expansion)
|
|
47
|
+
│ │ └── storage.go # Storage interface definition
|
|
42
48
|
│ ├── ssh/
|
|
43
|
-
│ │ ├── client.go
|
|
44
|
-
│ │ ├── session_unix.go
|
|
45
|
-
│ │ └── session_windows.go
|
|
49
|
+
│ │ ├── client.go # SSH client implementation
|
|
50
|
+
│ │ ├── session_unix.go # SSH session management (Unix)
|
|
51
|
+
│ │ └── session_windows.go # SSH session management (Windows)
|
|
46
52
|
│ └── ui/
|
|
47
53
|
│ ├── components/
|
|
48
|
-
│ │ ├──
|
|
49
|
-
│ │ ├──
|
|
50
|
-
│ │ ├──
|
|
51
|
-
│ │ ├──
|
|
52
|
-
│ │ ├──
|
|
53
|
-
│ │ ├──
|
|
54
|
-
│ │
|
|
55
|
-
│ ├──
|
|
56
|
-
│
|
|
57
|
-
│
|
|
54
|
+
│ │ ├── bitwarden_collection_list.go # Bitwarden collection selector
|
|
55
|
+
│ │ ├── bitwarden_config.go # Bitwarden CLI configuration form
|
|
56
|
+
│ │ ├── bitwarden_login_form.go # Bitwarden login form component
|
|
57
|
+
│ │ ├── bitwarden_organization_list.go # Bitwarden organization selector
|
|
58
|
+
│ │ ├── bitwarden_unlock_form.go # Bitwarden unlock form component
|
|
59
|
+
│ │ ├── connection_list.go # List of SSH connections
|
|
60
|
+
│ │ ├── form.go # Form for adding/editing connections
|
|
61
|
+
│ │ ├── storage_select.go # Credential storage selection (Local/Bitwarden)
|
|
62
|
+
│ │ └── terminal.go # Terminal component for SSH sessions
|
|
63
|
+
│ ├── connection_handler.go # Connection lifecycle management
|
|
64
|
+
│ ├── model.go # Main UI model and state
|
|
65
|
+
│ ├── update.go # Update logic for UI events
|
|
66
|
+
│ └── view.go # View rendering logic
|
|
58
67
|
├── pkg/
|
|
59
68
|
│ └── sshutil/
|
|
60
|
-
│ ├── auth.go
|
|
61
|
-
│ ├── terminal_unix.go
|
|
62
|
-
│ └── terminal_windows.go
|
|
63
|
-
├── go.mod
|
|
64
|
-
├── go.sum
|
|
65
|
-
|
|
69
|
+
│ ├── auth.go # Authentication utilities (passh/plink, etc.)
|
|
70
|
+
│ ├── terminal_unix.go # Terminal utilities (Unix)
|
|
71
|
+
│ └── terminal_windows.go # Terminal utilities (Windows)
|
|
72
|
+
├── go.mod # Go module dependencies
|
|
73
|
+
├── go.sum # Go module checksums
|
|
74
|
+
├── package.json # npm package configuration
|
|
75
|
+
├── index.js # npm entry point
|
|
76
|
+
├── install.js # npm post-install script
|
|
77
|
+
├── LICENSE # MIT License
|
|
78
|
+
├── CONTRIBUTING.md # Contribution guidelines
|
|
79
|
+
├── FLOW.md # Application flow documentation
|
|
80
|
+
└── README.md # This file
|
|
66
81
|
```
|
|
67
82
|
|
|
68
83
|
**Note:**
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
- `
|
|
84
|
+
- **Local Storage Mode**: Uses `go-keyring` to securely store passwords in the system keyring (see `config.go`)
|
|
85
|
+
- **Bitwarden Integration**: Managed through several components:
|
|
86
|
+
- `bitwarden.go` handles vault operations via Bitwarden CLI
|
|
87
|
+
- `bitwarden_config.go`, `bitwarden_login_form.go`, `bitwarden_unlock_form.go` for authentication flows
|
|
88
|
+
- `bitwarden_organization_list.go`, `bitwarden_collection_list.go` for organizational vault management
|
|
89
|
+
- `storage_select.go` lets users choose between Local (with go-keyring) or Bitwarden storage
|
|
72
90
|
|
|
73
91
|
**Flow chart**
|
|
74
92
|
- [FLOW](https://github.com/eugeniofciuvasile/ssh-x-term/blob/main/FLOW.md)
|
|
@@ -76,7 +94,11 @@ ssh-x-term/
|
|
|
76
94
|
## Prerequisites
|
|
77
95
|
|
|
78
96
|
- **Go 1.24+**
|
|
79
|
-
- **
|
|
97
|
+
- **System keyring support** — for secure local password storage via go-keyring:
|
|
98
|
+
- **macOS**: Keychain (built-in)
|
|
99
|
+
- **Linux**: Secret Service API (`gnome-keyring`, `kwallet`, or compatible)
|
|
100
|
+
- **Windows**: Credential Manager (built-in)
|
|
101
|
+
- **Bitwarden CLI (`bw`)** — optional, for Bitwarden vault credential management ([install guide](https://bitwarden.com/help/cli/))
|
|
80
102
|
- **passh** — for password authentication on Unix ([compile it from here](https://github.com/clarkwang/passh))
|
|
81
103
|
- **tmux** — recommended for multi-window SSH sessions ([install guide](https://github.com/tmux/tmux/wiki/Installing))
|
|
82
104
|
- **plink.exe** — for password authentication on Windows ([download from PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html))
|
|
@@ -90,17 +112,20 @@ ssh-x-term requires the following system tools to be installed:
|
|
|
90
112
|
|
|
91
113
|
- `tmux`
|
|
92
114
|
- `passh`
|
|
93
|
-
-
|
|
115
|
+
- System keyring support (for secure local password storage)
|
|
116
|
+
- `bitwarden-cli` (optional, npm package: `@bitwarden/cli`, install globally: `npm install -g @bitwarden/cli`)
|
|
94
117
|
|
|
95
118
|
### Linux (Debian/Ubuntu):
|
|
96
119
|
|
|
97
120
|
```sh
|
|
98
121
|
sudo apt update
|
|
99
|
-
sudo apt install -y tmux
|
|
122
|
+
sudo apt install -y tmux gnome-keyring
|
|
100
123
|
npm install -g @bitwarden/cli
|
|
101
124
|
# follow github repo https://github.com/clarkwang/passh to compile passh
|
|
102
125
|
```
|
|
103
126
|
|
|
127
|
+
**Note**: For Linux, ensure you have a keyring daemon running (e.g., `gnome-keyring-daemon` or `kwallet`) for go-keyring to work.
|
|
128
|
+
|
|
104
129
|
### macOS (with Homebrew):
|
|
105
130
|
|
|
106
131
|
```sh
|
|
@@ -109,10 +134,13 @@ npm install -g @bitwarden/cli
|
|
|
109
134
|
# follow github repo https://github.com/clarkwang/passh to compile passh
|
|
110
135
|
```
|
|
111
136
|
|
|
137
|
+
**Note**: macOS uses Keychain by default, which is already available.
|
|
138
|
+
|
|
112
139
|
### Windows:
|
|
113
140
|
|
|
114
141
|
- Install `tmux` and `passh` via WSL/Cygwin or use alternatives.
|
|
115
142
|
- Install Bitwarden CLI with: `npm install -g @bitwarden/cli`
|
|
143
|
+
- Windows Credential Manager is used by go-keyring and is built-in.
|
|
116
144
|
|
|
117
145
|
## Installation
|
|
118
146
|
|
|
@@ -183,30 +211,52 @@ mv sxt /usr/local/bin/ # or any location in your PATH
|
|
|
183
211
|
sxt
|
|
184
212
|
```
|
|
185
213
|
|
|
186
|
-
2. **
|
|
214
|
+
2. **First run:** Choose your credential storage mode:
|
|
215
|
+
- **Local Storage**: Uses system keyring (Keychain/Secret Service/Credential Manager)
|
|
216
|
+
- **Bitwarden**: Uses Bitwarden vault (requires `bw` CLI and authentication)
|
|
217
|
+
|
|
218
|
+
3. **Manage SSH connections:**
|
|
187
219
|
- Press `a` to add, `e` to edit, `d` to delete a connection.
|
|
188
220
|
- Press `o` to toggle opening connections in a new tmux window.
|
|
189
221
|
- Press `Enter` to connect.
|
|
190
222
|
- Use arrow keys to navigate.
|
|
191
|
-
-
|
|
223
|
+
- Credentials are stored securely based on your chosen storage mode.
|
|
192
224
|
|
|
193
|
-
|
|
225
|
+
4. **Connection Form:**
|
|
194
226
|
- Fill in fields as prompted.
|
|
195
227
|
- `Tab` to navigate, `Ctrl+p` to toggle auth type, `Enter` to submit, `Esc` to cancel.
|
|
196
228
|
|
|
197
|
-
|
|
229
|
+
5. **SSH Session:**
|
|
198
230
|
- `Esc` to disconnect.
|
|
199
231
|
- Passwords are supplied securely via passh or plink.exe (never echoed or stored in plaintext).
|
|
200
232
|
|
|
201
233
|
## Configuration
|
|
202
234
|
|
|
203
|
-
|
|
204
|
-
|
|
235
|
+
SSH-X-Term supports two credential storage modes:
|
|
236
|
+
|
|
237
|
+
### Local Storage (Default)
|
|
238
|
+
- Config is stored at: `~/.config/ssh-x-term/ssh-x-term.json`
|
|
239
|
+
- **Passwords are stored securely in your system keyring** via `go-keyring`:
|
|
240
|
+
- **macOS**: Stored in Keychain
|
|
241
|
+
- **Linux**: Stored via Secret Service API (gnome-keyring/kwallet)
|
|
242
|
+
- **Windows**: Stored in Credential Manager
|
|
243
|
+
- Connection metadata (host, port, username, etc.) is saved in the JSON file
|
|
244
|
+
- Passwords are **never** stored in plaintext in the JSON file
|
|
245
|
+
|
|
246
|
+
### Bitwarden Vault Storage
|
|
247
|
+
- Connection secrets are stored in your Bitwarden vault
|
|
248
|
+
- Requires Bitwarden CLI (`bw`) to be installed and configured
|
|
249
|
+
- Supports both personal vaults and organization collections
|
|
205
250
|
|
|
206
251
|
## Security Notes
|
|
207
252
|
|
|
208
|
-
- **Passwords are
|
|
209
|
-
-
|
|
253
|
+
- **Local Storage Mode**: Passwords are stored securely using **go-keyring**, which integrates with your system's native credential storage:
|
|
254
|
+
- macOS: Keychain
|
|
255
|
+
- Linux: Secret Service API (gnome-keyring, kwallet, etc.)
|
|
256
|
+
- Windows: Credential Manager
|
|
257
|
+
- **Bitwarden Mode**: Credentials are managed via Bitwarden CLI and stored in your encrypted vault
|
|
258
|
+
- **SSH Authentication**: Passwords are supplied securely via subprocesses (`passh`, `plink.exe`) and never echoed or logged
|
|
259
|
+
- **No plaintext passwords**: Passwords are **never** written to disk in plaintext (not in config files or logs)
|
|
210
260
|
|
|
211
261
|
## License
|
|
212
262
|
|
|
@@ -226,7 +276,8 @@ For details, see the [MIT License](LICENSE).
|
|
|
226
276
|
|
|
227
277
|
## Credits
|
|
228
278
|
|
|
229
|
-
- [Bubble Tea](https://github.com/charmbracelet/bubbletea)
|
|
230
|
-
- [
|
|
231
|
-
- [
|
|
232
|
-
- [
|
|
279
|
+
- [Bubble Tea](https://github.com/charmbracelet/bubbletea) — Terminal UI framework
|
|
280
|
+
- [go-keyring](https://github.com/zalando/go-keyring) — Secure system keyring integration
|
|
281
|
+
- [Bitwarden CLI](https://bitwarden.com/help/cli/) — Bitwarden vault management
|
|
282
|
+
- [passh](https://github.com/clarkwang/passh) — Password-based SSH automation (Unix)
|
|
283
|
+
- [PuTTY/plink.exe](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) — Password-based SSH automation (Windows)
|