OpenSSH 8.3p1 introduces the need of having a public SSH key otherwise is gonna show the warning
load pubkey "/root/.ssh/id_rsa": invalid format
# ssh -V
OpenSSH_8.3p1, OpenSSL 1.1.1g 21 Apr 2020
To supress this message we can put in place our SSH public key or generate it from our private key with:
# ssh-keygen -y -f /root/.ssh/id_rsa > /root/.ssh/id_rsa.pub
As pointed out in https://bbs.archlinux.org/viewtopic.php?id=256210 there is already a commit ready to fix this in the future.
i ve had exactle the same error.
Load key "key_name": invalid format
I have solved it.
I suggest to check two things:
if you are using ~/.ssh/config
then pls check that you have specified there you PRIVATE key. If you specified publick key there - you ll get the error
pls check your echo $HOME.
in some OS like ubuntu\debian when you type:
$ sudo bash
your $HOME directory stay the same. I mean it is not /root
so OS is looking for ssh keys in /home/user/.ssh/ dir!
But you think it is using /root/.ssh dir
so pls check echo $HOME.