Fix SSH stream is None when close session.

6 jobs for !6579 with patch-avs-ssh-timeout in 14 minutes and 45 seconds (queued for 5 seconds)
merge request