1

I have a .ssh directory with a lot of keys to a lot of systems, using a collection of ssh config files, this has worked flawlessly for a few years now.

I reinstalled my machine yesterday (from Ubuntu 20.10, to Ubuntu 20.10),and started getting an error saying

pubkey "/home/michael/.ssh/vendor.key": invalid format

doing an strace showed

openat(AT_FDCWD, "/home/michael/.ssh/vendor.key.pub", O_RDONLY) = -1 ENOENT (No such file or directory)

This file has never existed, and I've never seen this error before in the ~4 years that it has been in use.

In addition to this, we also have CI/CD processes that failing because of this error. This process has been running error free for a few months now, but yesterday started getting this error. (this runs openjdk:8-jdk, with openssh-client installed)

What has caused this error to suddenly start? and is there an easy way to fix this? (Ideally that doesn't involve creating all of the associated public keys - my ssh directory is large, and a little too haphazard to script easily)

11
  • If your reinstallation was also a major OS version upgrade, the key might have been created using old SSH protocol version 1.x key formats. The old protocol has been proven to have fundamental flaws and so modern SSH versions are deprecating the support for the old protocol version and the associated key formats. Also, the strace indicates the command is looking for "vendor.key.pub" that does not seem to be there. – telcoM Feb 23 at 18:02
  • @telcoM it was u20.10 to u20.10 (multipass died, after an hour of kicking it I got bored and reinstalled) the .ssh directory lives in a /home directory disk, so it remounted that and all was as before. I know it is looking for the key.pub, my question is that I've never had that error before. – Michael B Feb 23 at 18:08
  • @roaima apologies - ubuntu 20.10 - the CI/CD process runs docker image openjdk:8-jdk (which I believe is buster based) with openssh-client installed – Michael B Feb 23 at 18:22
  • No worries. Does your vendor.key start with -----BEGIN RSA PRIVATE KEY----- or some other informational marker? Or does it have a single line in the shape ssh-rsa AAABC...long...string..of...characters..., optionally followed by a comment other identifier? – roaima Feb 23 at 18:40
  • 1
    yeah its a weird one! @roaima - it is a located in a home directory on a separate disk that was remounted. I posted this with the thought that someone would say 'ahh yes that's because of x thing' - but it seems its something weird – Michael B Feb 25 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.