diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js
index <HASH>..<HASH> 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;
fix(gitFs): catch and throw ssh error