webssh2_client 0.2.16 → 0.2.17
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 +15 -15
- package/client/public/client.htm +5 -3
- package/client/public/webssh2.bundle.js +1 -1
- package/client/public/webssh2.css +2 -2
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
WebSSH2 Client is a web-based SSH client that allows users to connect to SSH servers directly from their web browsers. It's built using modern web technologies and provides a seamless, secure SSH experience.
|
|
4
4
|
|
|
5
5
|
# EXPERIMENTAL
|
|
6
|
-
The current status
|
|
6
|
+
The current status is experimental, and this first version is a refactor of webssh2 v0.2.x to be compatible with a refactor of the same version of webssh2 as a stand-alone server-side component for BIG-IP running Node.js v6.9.1.
|
|
7
7
|
|
|
8
|
-
The intention is to harmonize the latest release of webssh2 splitting out the client and server as
|
|
8
|
+
The intention is to harmonize the latest release of webssh2 by splitting out the client and server as separate repos (webssh2-client and webssh2-server) but joining them both together as modules in a parent webssh2 in an attempt to provide backward compatibility.
|
|
9
9
|
|
|
10
|
-
The main idea
|
|
10
|
+
The main idea behind bifurcating the client/server is to make it easier to customize the client to work in other frameworks and use cases.
|
|
11
11
|
|
|
12
12
|
## Features
|
|
13
13
|
|
|
@@ -46,7 +46,7 @@ The main idea for bifurcating the client/server is to make it easier to customiz
|
|
|
46
46
|
|
|
47
47
|
## WebSSH2 Configuration
|
|
48
48
|
|
|
49
|
-
The WebSSH2 client can be customized using the `window.webssh2Config` object. This object is typically injected by the WebSSH2 server, but
|
|
49
|
+
The WebSSH2 client can be customized using the `window.webssh2Config` object. This object is typically injected by the WebSSH2 server, but users can also manually set or modify it for customization purposes.
|
|
50
50
|
|
|
51
51
|
### Basic Usage
|
|
52
52
|
|
|
@@ -103,8 +103,8 @@ The `autoConnect` option is used to create pre-configured connections:
|
|
|
103
103
|
|
|
104
104
|
- When set to `true`, the client will attempt to connect immediately using the provided SSH configuration, bypassing the login form.
|
|
105
105
|
- For `autoConnect` to work, you must provide at least the `host` in the SSH configuration.
|
|
106
|
-
-
|
|
107
|
-
- If the host is missing when `autoConnect` is `true
|
|
106
|
+
- `autoConnect` requires a username and password. If these are not provided, the server may use other methods (like basic auth or session data) to authenticate the connection.
|
|
107
|
+
- If the host is missing when `autoConnect` is `true,` the login form will be shown instead.
|
|
108
108
|
|
|
109
109
|
Example usage:
|
|
110
110
|
|
|
@@ -124,10 +124,10 @@ This configuration will attempt to connect to `example.com` as soon as the page
|
|
|
124
124
|
|
|
125
125
|
### Security Considerations
|
|
126
126
|
|
|
127
|
-
|
|
128
|
-
- If you do include username and password in the client-side configuration, be cautious as this may pose security risks, especially in production environments.
|
|
127
|
+
The `autoConnect` feature only requires the host to be specified. The server handles authentication, which may use various methods, including basic auth or session data.
|
|
128
|
+
- If you do include a username and password in the client-side configuration, be cautious, as this may pose security risks, especially in production environments.
|
|
129
129
|
- For production use, consider using secure server-side authentication methods rather than including credentials in the client-side configuration.
|
|
130
|
-
|
|
130
|
+
When `autoConnect` is not used, ensure your server is configured to prompt for or securely handle credentials as needed.
|
|
131
131
|
|
|
132
132
|
### Customization Examples
|
|
133
133
|
|
|
@@ -163,7 +163,7 @@ This configuration will attempt to connect to `example.com` as soon as the page
|
|
|
163
163
|
};
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
-
By leveraging these configuration options, you can customize the WebSSH2 client to suit your
|
|
166
|
+
By leveraging these configuration options, you can customize the WebSSH2 client to suit your needs or integrate it seamlessly into your existing systems. Remember that the server handles authentication, providing flexibility in managing and securing credentials.
|
|
167
167
|
|
|
168
168
|
## Usage
|
|
169
169
|
|
|
@@ -239,7 +239,7 @@ The WebSSH2 client supports various URL parameters to customize the SSH connecti
|
|
|
239
239
|
|
|
240
240
|
### SSH Connection Parameters
|
|
241
241
|
|
|
242
|
-
- `host`: The hostname or IP address of the SSH server to
|
|
242
|
+
- `host`: The hostname or IP address of the SSH server to which to connect.
|
|
243
243
|
- Example: `?host=192.168.1.1`
|
|
244
244
|
|
|
245
245
|
- `port`: The port number of the SSH server (default is 22).
|
|
@@ -248,7 +248,7 @@ The WebSSH2 client supports various URL parameters to customize the SSH connecti
|
|
|
248
248
|
- `username`: The username to use for SSH authentication.
|
|
249
249
|
- Example: `?username=admin`
|
|
250
250
|
|
|
251
|
-
- `password`: The password
|
|
251
|
+
- `password`: The password for SSH authentication (not recommended for production use).
|
|
252
252
|
- Example: `?password=secretpassword`
|
|
253
253
|
|
|
254
254
|
### Terminal Configuration
|
|
@@ -306,7 +306,7 @@ A full URL with multiple parameters might look like this:
|
|
|
306
306
|
http://localhost:2222/ssh/host/192.168.1.100?port=2222&header=Production%20Server&headerBackground=red&fontSize=14&bellStyle=none
|
|
307
307
|
```
|
|
308
308
|
|
|
309
|
-
This URL would connect to a SSH server at 192.168.1.100 on port 2222, with a red header displaying "Production Server", using a 14px font size and
|
|
309
|
+
This URL would connect to a SSH server at 192.168.1.100 on port 2222, with a red header displaying "Production Server", using a 14px font size and turning off the audible bell.
|
|
310
310
|
|
|
311
311
|
Note: Be cautious about including sensitive information like passwords in URL parameters, especially in production environments.
|
|
312
312
|
|
|
@@ -318,7 +318,7 @@ This project uses the `debug` module for logging. To enable debugging in the bro
|
|
|
318
318
|
2. Enter: `localStorage.debug = 'webssh2-client*'`
|
|
319
319
|
3. Refresh the page.
|
|
320
320
|
|
|
321
|
-
To
|
|
321
|
+
To turn off debugging, enter: `localStorage.debug = ''`
|
|
322
322
|
|
|
323
323
|
## Contributing
|
|
324
324
|
|
|
@@ -342,4 +342,4 @@ This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md
|
|
|
342
342
|
|
|
343
343
|
- [Xterm.js](https://xtermjs.org/) for providing the terminal emulator
|
|
344
344
|
- [Socket.IO](https://socket.io/) for real-time, bidirectional communication
|
|
345
|
-
- [Webpack](https://webpack.js.org/) for module bundling
|
|
345
|
+
- [Webpack](https://webpack.js.org/) for module bundling
|
package/client/public/client.htm
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Version Version 0.2.
|
|
1
|
+
<!-- Version Version 0.2.17 - 2024-08-13T01:16:49.507Z - 4b647e8 -->
|
|
2
2
|
<!-- webssh2-client -->
|
|
3
3
|
<!-- /client/src/client.htm -->
|
|
4
4
|
<!DOCTYPE html>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<title>WebSSH2</title>
|
|
8
8
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
9
9
|
<script>
|
|
10
|
-
|
|
10
|
+
window.webssh2Config = null;
|
|
11
11
|
</script>
|
|
12
12
|
<script defer src="webssh2.bundle.js"></script><link href="webssh2.css" rel="stylesheet"></head>
|
|
13
13
|
<body>
|
|
@@ -32,13 +32,15 @@
|
|
|
32
32
|
<p id="errorMessage"></p>
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
|
+
<button id="reconnectButton">Reconnect</button>
|
|
35
36
|
<div class="box">
|
|
36
37
|
<div id="header"></div>
|
|
37
38
|
<div id="terminalContainer" class="terminal"></div>
|
|
38
39
|
<div id="bottomdiv">
|
|
39
40
|
<div class="dropup" id="menu">
|
|
40
41
|
<i class="fas fa-bars fa-fw"></i> Menu
|
|
41
|
-
<div id="dropupContent"
|
|
42
|
+
<div id="dropupContent">
|
|
43
|
+
<button id="stopLogBtn" class="menu-button"><i class="fas fa-cog fa-spin fa-fw"></i> Stop Log</button>
|
|
42
44
|
<button id="logBtn" class="menu-button"><i class="fas fa-clipboard fa-fw"></i> Start Log</button>
|
|
43
45
|
<button id="downloadLogBtn" class="menu-button"><i class="fas fa-download fa-fw"></i> Download Log</button>
|
|
44
46
|
<button id="credentialsBtn" class="menu-button"><i class="fas fa-key fa-fw"></i> Credentials</button>
|