diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js
index 98da4e15bc0e5679ef0ea11d7ff6ee8280999fe2..100e406e42007d2957542ed7b486e6aa788b2c88 100644
--- a/lib/workers/branch/index.js
+++ b/lib/workers/branch/index.js
@@ -306,6 +306,15 @@ async function processBranch(branchConfig, prHourlyLimitReached, packageFiles) {
       logger.debug('Throwing bad credentials');
       throw new Error('bad-credentials');
     }
+    if (
+      err.message &&
+      err.message.startsWith(
+        'ssh_exchange_identification: Connection closed by remote host'
+      )
+    ) {
+      logger.debug('Throwing bad credentials');
+      throw new Error('bad-credentials');
+    }
     if (err.message === 'bad-credentials') {
       logger.debug('Passing bad-credentials error up');
       throw err;