﻿# An OpenSSH forced command does not disable forwarding authority

A practical investigation of an OpenSSH forced command does not disable forwarding authority, with explicit observations, control cases and evidence limits.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/field-sovereign-openssh-forcecommand-forwarding-access/
Language: en

## The deployment scenario

A private serving host offers a support account restricted to a diagnostic command through ForceCommand. The access record says the account can only run that command. A client can also request forwarding through the same SSH connection if the applicable policy permits it. The command restriction therefore does not establish the complete network-access boundary of the support identity or the services reachable through its channels.

## The data and control mechanism

OpenSSH documents ForceCommand as applying to shell, command and subsystem execution while explicitly not limiting TCP, agent, socket or X11 forwarding. Its server configuration offers independent forwarding controls, including DisableForwarding. The client also supports forwarding without executing a remote command. Thus a successful forced diagnostic response cannot prove that another channel type was denied; the server policy must address the desired access classes separately.

## Define the intended boundary

Define the support identity, permitted diagnostic operation and whether any forwarding is intentionally allowed. Inspect effective Match configuration and other applicable restrictions for that identity. If forwarding is unnecessary, identify the corresponding explicit controls. If required, define approved targets and listening scope under the selected supported mechanism. A forced command should not be described as an automatic firewall or as validation of application permissions behind an allowed tunnel.

## A step-by-step review

First inspect the effective server configuration in an authorized read-only review. Use a disposable SSH server and synthetic destination to test the restricted command and a separate forwarding request. Observe denial or allowed reachability without invoking a private service. Next apply the intended forwarding control in that fixture and repeat both cases. Keep a positive diagnostic control so a broken SSH login does not masquerade as correct forwarding denial.

## Evidence required for acceptance

Acceptance requires caller identity, effective command restriction, effective forwarding policy and independently observed outcomes for each requested access type. Preserve the distinction between a rejected channel and a downstream service that simply did not answer. Verify listener placement if forwarding is permitted. Do not publish real private keys or internal service details in the evidence; harmless destination identities and the applicable policy are sufficient for the scoped control question.

## Failure cases and limits

This review does not prescribe disabling every legitimate tunnel or changing production SSH configuration. It prevents command-only language from hiding another authorized access path. Existing sessions, application credentials and administrative revocation remain separate lifecycle questions. The useful result is a technical support-access contract whose command and forwarding scope are both explicit, rather than a claim of complete private-host isolation inferred from one successful forced command.

## Primary references and related reading

Review command execution and forwarding channels separately when scoping a private support account. [OpenSSH forced commands and independent forwarding controls](https://man.openbsd.org/sshd_config); [OpenSSH forwarding without remote command and master controls](https://man.openbsd.org/ssh).

The proposed investigation of openssh forcecommand forwarding access is a proposed technical boundary review; no production workload or private data was used. Related reading: [Runpod SSH port forwarding for a private local service](/journal/runpod-private-port-forward/); [Equipment security when joining a GPU pool](/journal/hardware-security/).
