micropost: 8 Feb 2025

This commit is contained in:
Ming Di Leom 2025-02-08 10:11:22 +00:00
parent 7b1b1ce7cb
commit 6d7ddc7906
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
1 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,8 @@
---
title: Unable to get SSH host key due to short timeout
date: 2025-02-08
---
Some servers can be a bit slow in responding to host key request, so `ssh-keyscan` may return empty result when using the default 5 seconds timeout. A workaround is to [increase the timeout](https://unix.stackexchange.com/a/443251), `ssh-keyscan -T 10 hostname` for 10 seconds.
Noticed this issue from host key verification error when mirroring a GitLab repository to an external repository. I could not fix it because I can't modify the SSH client configuration in GitLab.com to increase `ConnectTimeout`.