I've a server setup which is accessed via SSH by pulling a key from an external secure server. The SSH key is not password protected however asks for a password when I try to access the server:
Enter passphrase for key 'my-key'
When I view the key using vi, it has a noeol message at the end of the file
-----BEGIN OPENSSH PRIVATE KEY-----
...
...
-----END OPENSSH PRIVATE KEY-----
~
~
~
~
~
~
~
~/.ssh/my-key" [noeol] 27L, 1798C
This is rectified when I append \n when copying the key. Why does a lack of EOL cause the key to look for a password?
It can be because of the (proprietary) OPENSSH private key format, described here, which includes: