OS X 10.13.2 High Sierra SSH Invalid key length

Apple OS X 10.13.2 High Sierra latest update has defaulted to 2048 key length and SHA256 algorithm. This breaks all existing SSH keys that are lower e.g. 1024 or in PEM format. The error thrown by the SSH client is “Invalid key length”.

Fix:
None. Generate a new key pair with ssh-keygen and update remote servers with the public key.

 

OS X 10.13.2 High Sierra SSH Invalid Format

OS X 10.13.2 High Sierra has broken SSH again.

$ ssh remote_server -i ~/.ssh/id_rsa.pub
$ Load key "xxx/.ssh/id_rsa.pub": invalid format

From 10.13.2 onwards the PRIVATE key is needed, earlier versions allowed the Public key “id_rsa.pub” to be used as the identity file.

So change script or ~/.ssh/config accordingly.