title: How to know the SSH key's length?
body: <p>How to know the SSH key's length?</p>
  
  <p>I'm getting the following error for my <code>git pull</code> just recently, </p>
  
  <pre><code>$ git pull
  &gt; GitLab: Your SSH key must be at least 2048 bits.
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  </code></pre>
  
  <p>where everything had been working fine before. </p>
  
  <p>Instead of guessing (or trial-n-error) which key is the culprit, is it possible to list all my SSH keys' length? </p>
  
  <p><strong>UPDATE:</strong> </p>
  
  <ul>
  <li><p>Only <code>git pull</code> is giving me above error. I.e., my public key is still fine:</p>
  
  <pre><code>$ ssh -T git@salsa.debian.org
  Welcome to GitLab, @myid-guest!
  </code></pre></li>
  <li><p>The <code>ssh-keygen -lf</code> might not be the answer, as I'm following <a href="https://docs.gitlab.com/ee/ssh/" rel="nofollow noreferrer">https://docs.gitlab.com/ee/ssh/</a>, who recommends to use <code>ed25519</code> as default key, and who also instructs that, to generate a new ED25519 SSH key pair, do <code>ssh-keygen -t ed25519 -C "email@example.com"</code>. However, my <code>ssh-keygen -lf</code> reports that</p>
  
  <pre><code>$ ssh-keygen -lf id_ed25519.pub
  256 SHA256:PO2bk6B...
  </code></pre></li>
  </ul>
  
  <p>It is unlikely that the recommend ED25519 SSH key is only 256 bits long. </p>
  
  <p>￼</p>