=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh.c,v retrieving revision 1.555 retrieving revision 1.556 diff -u -r1.555 -r1.556 --- src/usr.bin/ssh/ssh.c 2021/05/14 05:20:32 1.555 +++ src/usr.bin/ssh/ssh.c 2021/05/17 11:43:16 1.556 @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.555 2021/05/14 05:20:32 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.556 2021/05/17 11:43:16 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -2126,7 +2126,8 @@ stdin_null_flag = 1; no_shell_flag = 1; tty_flag = 0; - if (!fork_after_authentication_flag && !ono_shell_flag) + if (!fork_after_authentication_flag && + (!ono_shell_flag || options.stdio_forward_host != NULL)) need_controlpersist_detach = 1; fork_after_authentication_flag = 1; }