Question
Has OpenSSH introduced a change that requires \n at the end of the private key file (id_rsa)? Previously I was on Ubuntu 18.04 and I believe id_rsa without \n at the end of the file was working. Now on Ubuntu 20.04, ssh does not work if id_rsa does not have \n at the end of the file.
$ diff id_rsa.bak.od id_rsa.od
163,164c163,164
< 000a20 K E Y - - - - -
< 000a29
---
> 000a20 K E Y - - - - - \n
> 000a2aWithout the \n, it causes the error.
$ ssh -i ~/.ssh/id_rsa ubuntu
Load key "/home/hadoop/.ssh/id_rsa": invalid formatEnvironment
$ ssh -V
OpenSSH_8.2p1 Ubuntu-4ubuntu0.2, OpenSSL 1.1.1f 31 Mar 2020
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL=""
SUPPORT_URL=""
BUG_REPORT_URL=""
PRIVACY_POLICY_URL=""
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal 2 Reset to default