Openssh version: 8.8p1-git2e5cfed513e84444483baf1d8b31c40072b05103 ssh -vv ip #situation 1: # hanging [root@localhost ~]# sleep 30 >/dev/null 2>&1 & exit [1] 15494 logout debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0 debug2: channel 0: rcvd eow debug2: chan_shutdown_read: channel 0: (i0 o0 sock -1 wfd 4 efd 6 [write]) debug2: channel 0: input open -> closed #situation 2: # hanging [root@localhost ~]# sleep 30 >/dev/null 2>&1 & [1] 15556 [root@localhost ~]# exit logout debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0 debug2: channel 0: rcvd eow debug2: chan_shutdown_read: channel 0: (i0 o0 sock -1 wfd 4 efd 6 [write]) debug2: channel 0: input open -> closed #situation 3: # This is a normal exit [root@localhost ~]# exit logout debug2: channel 0: rcvd eof debug2: channel 0: output open -> drain debug2: channel 0: obuf empty debug2: chan_shutdown_write: channel 0: (i0 o1 sock -1 wfd 5 efd 6 [write]) debug2: channel 0: output drain -> closed debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0 debug2: channel 0: rcvd eow debug2: chan_shutdown_read: channel 0: (i0 o3 sock -1 wfd 4 efd 6 [write]) debug2: channel 0: input open -> closed debug2: channel 0: rcvd close debug2: channel 0: almost dead debug2: channel 0: gc: notify user debug2: channel 0: gc: user detached debug2: channel 0: send close debug2: channel 0: is dead debug2: channel 0: garbage collecting debug1: channel 0: free: client-session, nchannels 1 Connection to 45.77.159.33 closed. Transferred: sent 2992, received 4408 bytes, in 6.0 seconds Bytes per second: sent 500.1, received 736.8 debug1: Exit status 0
But it does exit after 30 seconds, right? If so, then this is completely intentional. Use nohup if you want to disown background processes.
commit 5c79952dfe1aa36105c93b3f383ce9be04dee384 upstream: prepare for conversion of ssh, sshd mainloop from From this commit, ssh will be hanging. But before this commit, ssh will exit immediately. This conversion is not completed, not ready for use yet?
Thanks for finding the commit that caused this - it was a great help. That commit accidentally disabled a hack for Linux to handle this condition on sessions with ttys. I just pushed a fix in e204b343
closing bugs resolved before openssh-8.9