File tree Expand file tree Collapse file tree 3 files changed +44
-4
lines changed
Expand file tree Collapse file tree 3 files changed +44
-4
lines changed Original file line number Diff line number Diff line change @@ -431,6 +431,22 @@ SSHWIFTY_ONLYALLOWPRESETREMOTES
431431
432432These options are correspond to their counterparts in the configuration file.
433433
434+ ` SSHWIFTY_PRESETS ` is a bit special because it should contain valid JSON
435+ encoded Preset data. An sample of it's format is demonstrated in the
436+ [ ` preset.example.json ` ] file and can be loaded via ` cat ` command. For example:
437+
438+ SSHWIFTY_PRESETS=$(cat preset.example.json) ./sshwifty
439+
440+ Of course, you can also directly setup ` SSHWIFTY_PRESETS ` with a string. But in
441+ such case, you might need to escape the JSON characters. To do that, one option
442+ is to use ` jq ` :
443+
444+ cat preset.example.json | jq -c | jq -Rs
445+
446+ Which should give you one line of escaped JSON string, safe for use in scripts.
447+
448+ [ `preset.example.json` ] : preset.example.json
449+
434450Notice: When you're using environment variables to configure Sshwifty, only one
435451Sshwifty HTTP server is then allowed. There is no way to setup multiple servers
436452under this method of configuration. If you need to serve on multiple ports, use
Original file line number Diff line number Diff line change 11[
22 {
3- "Title" : " Testing telnet server" ,
3+ "Title" : " SDF.org Unix Shell" ,
4+ "Type" : " SSH" ,
5+ "Host" : " sdf.org:22" ,
6+ "TabColor" : " 112233" ,
7+ "Meta" : {
8+ "Encoding" : " utf-8" ,
9+ "Authentication" : " Password"
10+ }
11+ },
12+ {
13+ "Title" : " My own super secure server" ,
14+ "Type" : " SSH" ,
15+ "Host" : " localhost" ,
16+ "Meta" : {
17+ "User" : " root" ,
18+ "Encoding" : " utf-8" ,
19+ "Private Key" : " -----BEGIN RSA !!!Will be sent to client in plain-text!!! -END RSA PRI...\n " ,
20+ "Authentication" : " Private Key" ,
21+ "Fingerprint" : " SHA256:bgO...."
22+ }
23+ },
24+ {
25+ "Title" : " My own super expensive router" ,
426 "Type" : " Telnet" ,
5- "Host" : " sshwifty-telnet-test:5555" ,
6- "Meta" : {}
27+ "Host" : " localhost" ,
28+ "Meta" : {
29+ "Encoding" : " ibm866"
30+ }
731 }
832]
Original file line number Diff line number Diff line change 4242 "Meta" : {
4343 "User" : " root" ,
4444 "Encoding" : " utf-8" ,
45- "Private Key" : " -----BEGIN RSA Will be sent to client-END RSA PRI...\n " ,
45+ "Private Key" : " -----BEGIN RSA !!! Will be sent to client in plain-text!!! -END RSA PRI...\n " ,
4646 "Authentication" : " Private Key" ,
4747 "Fingerprint" : " SHA256:bgO...."
4848 }
You can’t perform that action at this time.
0 commit comments