Skip to content

Inspect a study over SSH

Inspect DICOM files on a remote machine without copying them to a third-party viewer or exposing the unauthenticated server publicly.

  • dcmview is installed on the remote machine that can read the DICOM files.
  • You can connect to that machine with SSH.
  • A chosen port is available on both machines, or you can adapt the forwarding command.

On the remote machine, choose a fixed loopback port so the forwarding command is predictable:

Terminal window
dcmview --no-browser --host 127.0.0.1 --port 8888 /path/to/study

Wait for the startup message:

dcmview: server running at http://127.0.0.1:8888

The server remains bound to the remote loopback interface. Do not replace the host with 0.0.0.0 for this workflow.

On your local machine, open a second terminal:

Terminal window
ssh -L 8888:127.0.0.1:8888 user@remote-server

Keep the SSH session open, then visit http://localhost:8888 in your local browser. The browser connects to the local end of the tunnel, SSH carries requests to the remote loopback server, and DICOM files remain on the remote machine.

Omit --port when a fixed remote port is inconvenient:

Terminal window
dcmview --no-browser /path/to/study

Copy the printed port into both port positions of the SSH command. For example, if dcmview prints port 43127:

Terminal window
ssh -L 43127:127.0.0.1:43127 user@remote-server

Then open http://localhost:43127.

Press Ctrl+C in the remote dcmview terminal, then close the SSH forwarding session. The temporary server and in-memory state are removed.

  • If the local port is busy, use a different first port: ssh -L 8899:127.0.0.1:8888 …, then open http://localhost:8899.
  • If the browser cannot connect, confirm that both processes are still running and that the forwarded remote port matches the dcmview startup URL.
  • If server startup fails, select another remote port or use the default automatic port.
  • If your environment requires the viewer process to launch an SSH helper, see --tunnel, --tunnel-host, and --tunnel-port in the CLI reference.

The server has no authentication. Anyone who can reach it may be able to access pixels, tags, file paths, identifiers, and annotations. See ephemeral state and network security for the complete boundary.