diff --git a/src/sbbs3/answer.cpp b/src/sbbs3/answer.cpp
index c822ed792593f1f7e3f641b8cbf79d3612a6688c..fa548171af0c627afd1359f55db3aa6b17446190 100644
--- a/src/sbbs3/answer.cpp
+++ b/src/sbbs3/answer.cpp
@@ -446,6 +446,8 @@ bool sbbs_t::answer()
 					}
 					if (cryptStatusOK(i)) {
 						i=cryptGetAttribute(ssh_session, CRYPT_SESSINFO_SSH_CHANNEL, &ccid);
+						if (cid == -1)
+							cid = ccid;
 						if (cryptStatusOK(i) && ccid != cid)
 							continue;
 					}