WebSSH2 Client is an HTML5 web-based terminal emulator and SSH client component. It uses WebSockets to communicate with a WebSSH2 server, which in turn uses SSH2 to connect to SSH servers.
This package contains only the browser-side client component of WebSSH2. It requires a compatible WebSSH2 server to function. The server component is available at webssh2 server. This package is intended for advanced users who want to customize or integrate the client component independently.
This is an experimental refactor of the WebSSH2 v0.2.x client to function as a standalone component. It has been separated from the server-side code to facilitate customization and integration with different frameworks.
- Modern web browser with JavaScript enabled
- Compatible WebSSH2 server instance (v0.2.x or compatible)
- Socket.IO v2.2.0 compatibility (due to server requirements)
-
Clone the repository:
git clone https://github.com/billchurch/webssh2_client.git cd webssh2_client
-
Install dependencies:
npm install
-
Build the client:
npm run build
-
The built client files will be in the
client/public
directory.
The WebSSH2 client requires a compatible server that provides:
- WebSocket endpoint for SSH communication
- Authentication handling
- SSH connection management
- Socket.IO v2.2.0 compatibility
For server setup instructions, refer to the WebSSH2 server documentation.
- Web-based SSH client with xterm.js terminal emulation
- Customizable terminal settings:
- Font size and family
- Color schemes
- Cursor behavior
- Scrollback buffer size
- Session logging with download capability
- Copy and paste functionality
- Terminal mouse support
- Keyboard shortcuts
- Responsive design
- Multi-factor authentication support (when supported by server)
- Support for credential replay and reauthentication
The client can be configured through:
- URL parameters
- Configuration object
- User interface settings
Supported URL parameters include:
host
- SSH server hostnameport
- SSH server port (default: 22)header
- Optional header textheaderBackground
- Optional header background colorsshterm
- Terminal type (default: xterm-color)
You can configure the client by setting window.webssh2Config
:
window.webssh2Config = {
socket: {
url: null, // WebSocket URL (auto-detected if null)
path: '/ssh/socket.io' // Socket.IO path
},
ssh: {
host: null, // SSH server hostname
port: 22, // SSH server port
username: null,
sshterm: 'xterm-color'
},
header: {
text: null,
background: 'green'
},
autoConnect: false
};
- For development information see DEVELOPMENT.md.
If you find this project helpful, consider supporting the developer:
This project is licensed under the MIT License - see the LICENSE.md file for details.