MaxSessions 0 # ZERO!!! in your sshd_config ensures that no interactive commands can be used For good measure you can also add ForceCommand /usr/bin/false which will override any command which is specified on the command line On Mon, 5 Jul 2021 at 16:35, Christoph Anton Mitterer <calestyo at scientia.net> wrote:> > Hey. > > I've just wondered whether there is a counterpart for ssh's -N for > ssh_config... at least I couldn't find anything in the manpage. > > Thanks, > Chris. > > _______________________________________________ > openssh-unix-dev mailing list > openssh-unix-dev at mindrot.org > https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
On Mon, 2021-07-05 at 19:46 -0400, M Rubon wrote:> ?? MaxSessions 0??? # ZERO!!! > in your sshd_config ensures that no interactive commands can be usedThanks, but I don't think this is really an equivalent of ssh's -N, as it needs to be set on the server side, which one might not even have permissions to do so... and even if, if would affect all connections... and I don't think one can work around this with Match or so. Cheers, Chris.