load pubkey ***: invalid format

这个是因为私钥目录里没有对应的公钥导致的,使用类似下面的方法生成下公钥即可

ssh-keygen -f ~/.ssh/id_rsa -y > ~/.ssh/id_rsa.pub