From be823026de27c7472fa88abae5e9ecc788bdbabd Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Tue, 14 Nov 2017 10:08:43 +0000
Subject: [PATCH] Fix for SSH: Active connections (sessions) would be
 interrupted if another SSH connetion came in and failed (e.g. IP was blocked
 or failed negotiation).

---
 src/sbbs3/main.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp
index b2f1c65810..5b8fcc9583 100644
--- a/src/sbbs3/main.cpp
+++ b/src/sbbs3/main.cpp
@@ -5488,6 +5488,7 @@ NO_PASSTHRU:
 			new_node->sys_status|=SS_SSH;
 			new_node->telnet_mode|=TELNET_MODE_OFF; // SSH does not use Telnet commands
 			new_node->ssh_session=sbbs->ssh_session;
+			sbbs->ssh_session=NULL; // Don't allow subsequent SSH connections to affect this one (!)
 			/* Wait for pending data to be sent then turn off ssh_mode for uber-output */
 			while(sbbs->output_thread_running && RingBufFull(&sbbs->outbuf))
 				SLEEP(1);
-- 
GitLab