Re: sshd’s ForceCommand and ssh’s "–N Do not execute a remote command"

Damien Miller djm at
Tue Aug 2 18:10:32 EST 2011

On Tue, 2 Aug 2011, Oleg Verych wrote:

> 2011/8/1 Damien Miller <djm at>:
> Hi, Damien.
> > No, our sshd can't refuse -N. Such a thing is hackish to implement
> > (how do you distinguish between a client that doesn't open a cmd/shell channel
> > from one that is merely slow in doing so? what about multiplexing?)
> If "sshd_config" has 'ForceCommand', `sshd` must not wait anything:
> 2) `ssh -N`
> It just runs 'ForceCommand' with stdio <>/dev/null until connection alive...

the protocol doesn't work that way

More information about the openssh-unix-dev mailing list