The SSH Transport project aims to provide SSH functionality over WebSocket/TLS connections using Go.
- Supports both command-line flags and file-based configuration.
- Works with secure and unsecure WebSocket and WSS connections.
- Designed for high performance with a low memory footprint.
- Supports SSH over TLS protocol.
- Clone the repository
- Build the project using one of the following methods:
- Run
goreleaser release
. - Use
go build
. - Use
go build -ldflags "-w -s"
for smaller binary size.
- Run
- Execute
ssh-transport
. - Sample:
ssh-transport -ssh=127.0.0.1:22 -ws-listen=0.0.0.0:80
. - Use the
-help
argument to get detailed usage information.
- Create a config.json file in the same directory as the ssh-transport binary.
- Fill in the configuration details config.json.
- Run
ssh-transport
without any cli arguments. - To disable WS or TLS leave the listen address empty like this
"listen": ""
location /sshws {
proxy_pass http://127.0.0.1:5153/;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade websocket;
proxy_set_header Connection Upgrade;
proxy_set_header Host $http_host;
proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;
proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
proxy_read_timeout 52w;
}
This project is licensed under the Apache-2.0 License. See the LICENSE file for details.