Web serving

To start DomTerm as a web server, run the domterm command with the --port option. It is highly recommended that you use https, with the --ssl option - see below.

Use the shell.default setting to specify the command (shell) to be run for each connection.

Warning: Note that anyone who can connect with a web browser to the specified port can run the default command (or the shell.default override), with the permissions of the user starting the server. You probably want to set up a guest user, or set shell.default to some kind of login program.

It is of course possible to run the ssh command from a DomTerm session, but that does not provide a persistent session on the remote server if the connection fails.

Using https

To use https you need a certificate.

A simple self-signed certificate:

openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout server.key -out server.crt -subj "/CN=localhost"

Start the server with these flags:

domterm --port 8080 --ssl --ssl-cert server.crt --ssl-key server.key

and then in your browser open https://localhost:8080. Note that browsers will complain about self-signed certificates, so this is only suitable for testing.