Browse Source

Update atoz.md (#299)

* Update atoz.md

Fix json section by removing json syntax highlighting. The `//` comments make it invalid and it looks weird. so i adjusted the note, tweaks the example to be valid without comments and one or two settings that were wrong and i think that will be acceptable.

* Update atoz.md

keep spaces instead of tabs
pull/303/head
userdocs 4 years ago
committed by GitHub
parent
commit
4a2180dc04
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 56
      docs/atoz.md

56
docs/atoz.md

@ -276,35 +276,31 @@ nano ~/.config/wetty/config.json
Here is the template `config.json` you need to use. Here is the template `config.json` you need to use.
**Note:** All option that you do not want to use can be commented out using `//`. For example `// title: 'Terminal', // Page title` will comment out this line and it will be ignored. **Note:** To be [validated json](https://codebeautify.org/jsonvalidator) the below json example should have the `// ...` comments removed. With all comments removed the example is valid json. They are in the example to help explain the options and won't stop wetty from loading if you leave them in place. Lines you do not need can be commented out but should be removed if you want the json to pass validation.
```json ```
{ "ssh": {
ssh: { "user": "username", // default user to use when ssh-ing
user: 'username', // default user to use when ssh-ing "host": "localhost", // Server to ssh to
host: 'localhost', // Server to ssh to "auth": "publickey,password", // shh authentication, method. Defaults to "password", you can use "publickey,password" instead'
auth: 'publickey,password', // shh authentication, method. Defaults to "password", you can use "publickey,password" instead' "pass": "password", // Password to use when ssh-ing
pass: "password", // Password to use when sshing "key": "/home/username/.ssh/wetty", // path to an optional client private key, connection will be password-less and insecure!
key: "/home/username/.ssh/wetty", // path to an optional client private key, connection will be password-less and insecure! "port": 22, // Port to ssh to
port: 22, // Port to ssh to "knownHosts": "/dev/null" // ssh knownHosts file to use
knownHosts: '/dev/null', // ssh knownHosts file to use },
}, "server": {
server: { "base": "/wetty/", // URL base to serve resources from
base: '/terminal/', // URL base to serve resources from "port": 3000, // Port to listen on
port: 3000, // Port to listen on "host": "0.0.0.0", // listen on all interfaces or can be 127.0.0.1 with nginx
host: '127.0.0.1', // address to listen on "title": "WeTTy - The Web Terminal Emulator", // Page title
title: 'Terminal', // Page title "bypassHelmet": false // Disable Helmet security checks
bypassHelmet: false, // Disable Helmet security checks },
}, "forceSSH": false, // Force sshing to local machine over login if running as root
"command": "login", // Command to run on server. Login will use ssh if connecting to different server
forceSSH: false, // Force sshing to local machine over login if running as root "ssl": {
command: 'login', // Command to run on server. Login will use ssh if connecting to different server "key": "/home/username/.ssl/wetty.key",
"cert": "/home/username/.ssl/wetty.crt"
ssl:{ }
key: '/home/username/.ssl/wetty.key',
cert: '/home/username/.ssl/wetty.crt',
}
} }
``` ```
@ -546,4 +542,4 @@ If you chose to not use a password to login in you should protect your instance
--command, -c command to run in shell [string] [default: "login"] --command, -c command to run in shell [string] [default: "login"]
--allow-iframe Allow wetty to be embedded in an iframe, defaults to allowing --allow-iframe Allow wetty to be embedded in an iframe, defaults to allowing
same origin [boolean] [default: false] same origin [boolean] [default: false]
``` ```

Loading…
Cancel
Save