key_load_public: invalid format

前端 未结 10 2615
滥情空心
滥情空心 2020-12-22 15:23

I used PuTTY Key Generator to generate a 4096 bit RSA-2 key with a passphrase.

I save the .ppk and an openSSL format public key. The putty format public key doesn\'t

10条回答
  •  Happy的楠姐
    2020-12-22 15:48

    If you're using Windows 10 with the built-in SSH, as of August 2020 it only supports ed25519 keys. You'll get the key_load_public: invalid format error if you use e.g. an RSA key.

    As per this GitHub issue it should be fixed via Windows Update some time in 2020. So one solution is to just wait for the update to ship.

    If you can't wait, a workaround is to generate a new ed25519 key, which is good advice anyway.

    > ssh-keygen -o -a 100 -t ed25519
    

    You can use it with e.g. github, but some older systems might not support this newer format.

    After generating your key, if you're using either of the below features, don't forget to update them!

    1. ~\.ssh\config might still point to the old key.
    2. Add the new key to ssh-agent via the ssh-add command

提交回复
热议问题