Skip to content

Running the rcfg-sim server

rcfg-sim is the SSH server. Each instance binds one IP and a contiguous range of ports, reads a manifest, mmaps the configs, and serves sessions.

Terminal window
./bin/rcfg-sim \
--listen-ip 127.0.0.1 \
--port-start 12000 \
--port-count 100 \
--manifest /tmp/rcfg-test/manifest.csv \
--host-key /tmp/rcfg-test/hostkey \
--metrics-addr 127.0.0.1:9100

This binds ports 12000–12099 on 127.0.0.1. In production you run one instance per IP as a systemd service instead of in the foreground.

FlagDefaultPurpose
--listen-ip10.50.0.1IP address to bind
--port-start10000First port in the contiguous range
--port-count2500Number of ports to bind
--manifest/opt/rcfg-sim/manifest.csvAuthoritative port→config mapping
--host-key/etc/rcfg-sim/ssh_host_rsa_keySSH host key (generated if missing)
--metrics-addr0.0.0.0:9100Prometheus /metrics + /healthz address (empty disables)
--max-concurrent-sessions5000Cap on concurrent sessions (drain)
--log-levelinfoerror | warn | info | debug

See the full set, including auth, timing, and fault flags, in the CLI reference.

FlagDefaultNotes
--usernameadminCurrently informational — SSH auth is password-only
--passwordadminEmpty string accepts any password
--enable-passwordenable123Cisco enable-mode password

These are the accepted credentials at the transport layer. Per-device credentials in the manifest are what tools should use. How the SSH layer authenticates is controlled by --ssh-auth.

If --host-key points at a missing file, the server generates one on first start. Keep the same key across restarts so SSH clients don’t see host-key-changed warnings.

--metrics-addr serves two paths:

  • GET /metrics — Prometheus exposition format
  • GET /healthz — liveness check

Set --metrics-addr "" to disable the HTTP server entirely. See Metrics.