The public SSH instance is for demo use or short-term usage and will disconnect users after an idle timeout to allow other users to try it out.
## How do I fix the error `SSH key is required to start server` when trying to run SSH server?
Generate the SSH key if the host machine doesn't have one:
```bash
$ ssh-keygen
```
Make sure the host key flag points to the location of the SSH key:
```bash
cointop server -k ~/.ssh/id_rsa [...]
```
## Why doesn't the version number work when I install with `go get`?
The version number is read from the git tag during the build process but this requires the `GO111MODULE` environment variable to be set in order for Go to read the build information:
The SSH server requires that the host has SSH keys, so generate SSH keys if not already:
```bash
$ ssh-keygen
```
Check keys were generated:
```bash
$ ls ~/.ssh
id_rsa id_rsa.pub
```
Run SSH server:
```bash
cointop server -p 2222
```
If the host SSH keys live elsewhere, specify the location:
```bash
cointop server -p 2222 -k ~/.ssh/some-dir/id_rsa
```
SSH into server to see cointop:
```bash
ssh localhost -p 2222
```
SSH demo:
The cointop SSH server will use the client's public SSH key as the identifier for persistent config by default. You may change it to use the username instead:
```bash
ssh cointop.sh
cointop server -p 2222 --user-config-type=username
```
Passing arguments to SSH server:
SSH'ing into server with same username will use the same respective config now:
```bash
ssh cointop.sh -t cointop --colorscheme synthwave
ssh alice@localhost -p 2222
```
Using docker to run SSH server:
Pass arguments to cointop on SSH server by using SSH `-t` flag followed by cointop command and arguments. For example:
docker run -p 2222:22 -v ~/.ssh:/keys --entrypoint cointop -it cointop/cointop server -k /keys/id_rsa
```
cointop server writes the client config to `/tmp/cointop_config` within the container, so to make it persistent in host attach a volume. The following example will to write the cached config to `~/.cache/cointop` on the host:
```bash
docker run -p 2222:22 -v ~/.ssh:/keys -v ~/.cache/cointop:/tmp/cointop_config --entrypoint cointop -it cointop/cointop server -k /keys/id_rsa